Skip to content

Commit fb24d7f

Browse files
committed
🐛 [#383] Populate _zaak_url when creating items
1 parent d776ccd commit fb24d7f

File tree

1 file changed

+6
-1
lines changed
  • backend/src/openarchiefbeheer/destruction

1 file changed

+6
-1
lines changed

backend/src/openarchiefbeheer/destruction/models.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ def set_status(self, status: str) -> None:
125125

126126
def add_items(self, zaken: Iterable["Zaak"]) -> list["DestructionListItem"]:
127127
return DestructionListItem.objects.bulk_create(
128-
[DestructionListItem(destruction_list=self, zaak=zaak) for zaak in zaken]
128+
[
129+
DestructionListItem(
130+
destruction_list=self, zaak=zaak, _zaak_url=zaak.url
131+
)
132+
for zaak in zaken
133+
]
129134
)
130135

131136
def get_author(self) -> "DestructionListAssignee":

0 commit comments

Comments
 (0)