# Mass delete command

* introduces new command for mass deleting entries based on specific pattern in identifier
    * command guides user through parameter collecting process
This commit is contained in:
2026-07-16 10:38:00 +02:00
parent 112b74f5cd
commit 02ce78551c
4 changed files with 122 additions and 6 deletions
+2 -2
View File
@@ -325,8 +325,8 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
self.identifier = self.generate_new_identifier()
super().save(*args, **kwargs)
def mark_as_deleted(self, user, send_mail: bool = True):
super().mark_as_deleted(user, send_mail)
def mark_as_deleted(self, user, send_mail: bool = True, comment: str|None = None):
super().mark_as_deleted(user, send_mail, comment)
if user is not None:
self.intervention.mark_as_edited(user, edit_comment=COMPENSATION_REMOVED_TEMPLATE.format(self.identifier))