Skip to content

Commit 2b0cc4f

Browse files
authored
Merge branch '978-migrate-users' into 1187-migrate-collections
2 parents 3bc38b0 + 2a52c7c commit 2b0cc4f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

backend/app/models/metadata.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"int": int,
2121
"float": float,
2222
"str": str,
23+
"string": str,
2324
"TextField": str,
2425
"bool": bool,
2526
# TODO figure out how to parse "yyyymmdd hh:mm:ssssssz" into datetime object

scripts/migration/migrate.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,6 @@ def process_user_and_resources(user_v1, USER_MAP, DATASET_MAP):
660660
files_result = files_response.json()
661661

662662
for file in files_result:
663-
file_v2_id = download_and_upload_file(
664-
file, all_dataset_folders, dataset_v2_id, base_user_headers_v2
665-
)
666663
if file_v2_id is not None:
667664
add_file_metadata(file, file_v2_id, clowder_headers_v1, user_headers_v2)
668665
# posting the collection hierarchy as metadata
@@ -692,6 +689,8 @@ def process_user_and_resources(user_v1, USER_MAP, DATASET_MAP):
692689
print(
693690
f"Failed to add collection info as metadata in Clowder v2. Status code: {response.status_code}"
694691
)
692+
if file_v2_id is not None:
693+
add_file_metadata(file, file_v2_id, clowder_headers_v1, user_headers_v2)
695694

696695
return [USER_MAP, DATASET_MAP]
697696

0 commit comments

Comments
 (0)