Skip to content

Commit c94f1d1

Browse files
committed
fix pointers to document pattern
1 parent 86bdf47 commit c94f1d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sde_collections/models/delta_patterns.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ def apply(self) -> None:
269269
# Bulk create associations in the through table
270270
through_model = getattr(self, field_name).through
271271
pattern_url_associations = [
272-
through_model(**{f"{field_name[:-1]}_id": url.id, "documenttypepattern_id": self.id}) for url in urls
272+
through_model(**{f"{field_name[:-1]}_id": url.id, "deltadocumenttypepattern_id": self.id})
273+
for url in urls
273274
]
274275
through_model.objects.bulk_create(pattern_url_associations, ignore_conflicts=True)
275276

@@ -301,7 +302,7 @@ def apply(self) -> None:
301302
# Bulk create associations in the through table
302303
through_model = getattr(self, field_name).through
303304
pattern_url_associations = [
304-
through_model(**{f"{field_name[:-1]}_id": url.id, "divisionpattern_id": self.id}) for url in urls
305+
through_model(**{f"{field_name[:-1]}_id": url.id, "deltadivisionpattern_id": self.id}) for url in urls
305306
]
306307
through_model.objects.bulk_create(pattern_url_associations, ignore_conflicts=True)
307308

0 commit comments

Comments
 (0)