X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6487d6773406f0da6724e24ad5ce6a94e1009cd..41a6554ca2281983645cf606ba6291cc2332dced:/sdk/python/arvados/commands/put.py diff --git a/sdk/python/arvados/commands/put.py b/sdk/python/arvados/commands/put.py index 8cf56b6a38..7b6b048b1d 100644 --- 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() - 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)