From 74784b33fd7b8b519b0ce0cbbdfa16dba2dad219 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 17 Feb 2015 21:04:38 +0000 Subject: [PATCH] 4520: tested copying, fixed bad 'properties' field --- sdk/python/arvados/commands/arv_copy.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py index 7f5468eec6..57f79b8047 100755 --- a/sdk/python/arvados/commands/arv_copy.py +++ b/sdk/python/arvados/commands/arv_copy.py @@ -412,7 +412,14 @@ def copy_collection(obj_uuid, src, dst, args): filters=[['portable_data_hash', '=', colhash]] ).execute() if dstcol['items_available'] > 0: - logger.debug("Skipping collection %s (already at dst)", obj_uuid) + if args.project_uuid: + c['owner_uuid'] = args.project_uuid + del c['uuid'] + if 'properties' in c: + del c['properties'] + return dst.collections().create(body=c, ensure_unique_name=True).execute() + else: + logger.info("Skipping collection %s (already at dst)", obj_uuid) return dstcol['items'][0] # Fetch the collection's manifest. @@ -467,8 +474,9 @@ def copy_collection(obj_uuid, src, dst, args): logger.debug('saving %s with manifest: <%s>', obj_uuid, dst_manifest) dst_keep.put(dst_manifest) - if 'uuid' in c: - del c['uuid'] + del c['uuid'] + if 'properties' in c: + del c['properties'] if args.project_uuid: c['owner_uuid'] = args.project_uuid -- 2.30.2