File tree Expand file tree Collapse file tree
dataset-catalog-client/catalog_client/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ def _create_or_update(
128128 canonical_id = dataset .canonical_id ,
129129 version = dataset .version ,
130130 project = dataset .project ,
131+ exclude_tombstoned = False ,
131132 limit = 10 , # reasonable limit for duplicates check
132133 )
133134 existing_datasets = results .results
@@ -146,13 +147,12 @@ def _create_or_update(
146147 f"Multiple datasets found ({ len (existing_datasets )} ) for { dataset_ref !r} "
147148 )
148149
150+ existing_dataset = existing_datasets [0 ]
149151 if update_if_exists :
150- existing_dataset = existing_datasets [0 ]
151152 self .datasets .update (existing_dataset .id , dataset )
152153 return existing_dataset .id
153154
154- # Default: return existing dataset ID without error
155- return existing_datasets [0 ].id
155+ return existing_dataset .id
156156
157157
158158class AsyncCatalogClient :
You can’t perform that action at this time.
0 commit comments