Skip to content

Commit 1cc8a89

Browse files
committed
add in other missing attribute
1 parent ff131b9 commit 1cc8a89

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

compose/backend/neurosynth_compose/scripts/backfill_extraction_metadata.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ def add_missing_extraction_ids(session=None) -> Tuple[int, int]:
2121
for project in projects:
2222
provenance = dict(project.provenance or {})
2323
extraction_metadata_raw = provenance.get("extractionMetadata")
24-
if not isinstance(extraction_metadata_raw, dict):
25-
skipped += 1
26-
continue
27-
28-
extraction_metadata = dict(extraction_metadata_raw)
29-
3024
changed = False
3125

26+
if isinstance(extraction_metadata_raw, dict):
27+
extraction_metadata = dict(extraction_metadata_raw)
28+
else:
29+
extraction_metadata = {}
30+
changed = True
31+
3232
if "studysetId" not in extraction_metadata:
3333
extraction_metadata["studysetId"] = None
3434
changed = True

0 commit comments

Comments
 (0)