Skip to content

Commit 802ee61

Browse files
committed
building the data for collections
1 parent f3edf58 commit 802ee61

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/migration/migrate.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,16 @@ def build_collection_hierarchy(collection_id, headers):
511511
print("Now we are done")
512512
return children
513513

514+
def build_collection_metadata_for_v1_dataset(dataset_id, user_v1, headers):
515+
dataset_collections = get_clowder_v1_dataset_collections(headers=headers, user_v1=user_v1, dataset_id=dataset_id)
516+
517+
collection_data = []
518+
for collection in dataset_collections:
519+
collection_children = build_collection_hierarchy(collection_id=collection['id'], headers=headers)
520+
for child in collection_children:
521+
collection_data.append(child)
522+
return collection_data
523+
514524

515525
if __name__ == "__main__":
516526
# users_v1 = get_clowder_v1_users()

0 commit comments

Comments
 (0)