X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/86c4b60b5f9e8ab1f20eeee1da0afce3db57ab3b..d7e750680bbf5e655d7c986ce0cff550c8022ca4:/sdk/python/arvados/commands/put.py diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py index da26a3ce01..7b6b048b1d 100644 --- a/sdk/python/arvados/commands/put.py +++ b/sdk/python/arvados/commands/put.py @@ -457,14 +457,17 @@ def main(arguments=None, stdout=sys.stdout, stderr=sys.stderr): }, ).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, - body={"owner_uuid": project_link["tail_uuid"], - "name": project_link["name"]}).execute() + arvados.api().collections().update(uuid=collection['uuid'], + body={"name": project_link["name"]}).execute() else: create_project_link(output, project_link) except apiclient.errors.Error as error: