},
).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:
- 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)