# 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
+3 -2
View File
@@ -306,7 +306,7 @@ class Intervention(BaseObject,
self.set_unchecked()
return action
def mark_as_deleted(self, user, send_mail: bool = True):
def mark_as_deleted(self, user, send_mail: bool = True, comment: str|None = None):
""" Extends base mark_as_delete functionality
Removes related deductions from the database, which results in updating the deductable_rest of the
@@ -315,11 +315,12 @@ class Intervention(BaseObject,
Args:
user (User): The performing user
send_mail (bool): Whether to send an info mail
comment (str|None): The delete comment
Returns:
"""
super().mark_as_deleted(user, send_mail)
super().mark_as_deleted(user, send_mail, comment)
# Remove pending deductions to free booked capacities
deductions = self.deductions.all()