Skip to content

Commit 73b51dd

Browse files
rhunwicksCopilot
andauthored
Minor fix to load_all_metadata - see HEA-572
Co-authored-by: Copilot <[email protected]>
1 parent 04e1676 commit 73b51dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pipelines/jobs/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def load_metadata_for_model(context: OpExecutionContext, sheet_name: str, model:
151151
instances = model.objects.bulk_create(
152152
instances,
153153
update_conflicts=True,
154-
update_fields=[k for k in record if k not in id_fields and k != model._meta.pk.name],
154+
update_fields=[k for k in valid_field_names if k not in id_fields and k != model._meta.pk.name],
155155
unique_fields=id_fields,
156156
)
157157
context.log.info(f"Created or updated {len(instances)} {sheet_name} instances")

0 commit comments

Comments
 (0)