# 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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user