Skip to content

Commit 6795c4c

Browse files
committed
adds entityid check to parent func
1 parent cbd5e5f commit 6795c4c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

schematic/store/synapse.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,16 +1070,19 @@ def updateDatasetManifestFiles(
10701070
synapse_id=manifest_id, syn=self.syn, download_file=True
10711071
)
10721072
manifest_filepath = manifest_entity.path
1073-
10741073
manifest = load_df(manifest_filepath)
1074+
1075+
# If the manifest does not have an entityId column, trigger a new manifest to be generated
1076+
if "entityId" not in manifest.columns:
1077+
return None
1078+
10751079
manifest_is_file_based = "Filename" in manifest.columns
10761080

10771081
if manifest_is_file_based:
10781082
# update manifest with additional filenames, if any
10791083
# note that if there is an existing manifest and there are files in the dataset
10801084
# the columns Filename and entityId are assumed to be present in manifest schema
10811085
# TODO: use idiomatic panda syntax
1082-
10831086
dataset_files, manifest = self.fill_in_entity_id_filename(
10841087
datasetId, manifest
10851088
)

0 commit comments

Comments
 (0)