Skip to content

Commit

Permalink
✨ [#397] Delete local zaak metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm committed Oct 25, 2024
1 parent 7762c20 commit 2172006
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/src/openarchiefbeheer/destruction/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ def create_report_zaak(self) -> None:

attach_report_to_zaak(destruction_list, store)

def clear_local_metadata(self) -> None:
self.items.filter(status=ListItemStatus.suggested).update(extra_zaak_data={})


class DestructionListItem(models.Model):
destruction_list = models.ForeignKey(
Expand Down
1 change: 1 addition & 0 deletions backend/src/openarchiefbeheer/destruction/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def complete_and_notify(pk: int) -> None:

destruction_list.generate_destruction_report()
destruction_list.create_report_zaak()
destruction_list.clear_local_metadata()

destruction_list.processing_status = InternalStatus.succeeded
destruction_list.save()
Expand Down

0 comments on commit 2172006

Please sign in to comment.