projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
3699: accept collection hash as uuid
[arvados.git]
/
sdk
/
python
/
arvados
/
commands
/
put.py
diff --git
a/sdk/python/arvados/commands/put.py
b/sdk/python/arvados/commands/put.py
index 8cf56b6a38ab864143ba2bac9927e5e22ea4129d..7b6b048b1d035adc7b3b3399fd77a2c81e3bed3b 100644
(file)
--- a/
sdk/python/arvados/commands/put.py
+++ b/
sdk/python/arvados/commands/put.py
@@
-457,12
+457,16
@@
def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr):
},
).execute()
},
).execute()
- output = collection['uuid']
+ if 'portable_data_hash' in collection and collection['portable_data_hash']:
+ output = collection['portable_data_hash']
+ else:
+ output = collection['uuid']
+
if project_link is not None:
# Update collection name
try:
if 'name' in collection:
if project_link is not None:
# Update collection name
try:
if 'name' in collection:
- arvados.api().collections().update(uuid=
output
,
+ arvados.api().collections().update(uuid=
collection['uuid']
,
body={"name": project_link["name"]}).execute()
else:
create_project_link(output, project_link)
body={"name": project_link["name"]}).execute()
else:
create_project_link(output, project_link)