* adds support for GET /check on intervention to run checks automatically via API
This commit is contained in:
2022-01-25 09:29:14 +01:00
parent 096688fad5
commit 0b723b1529
8 changed files with 132 additions and 35 deletions

View File

@@ -154,6 +154,7 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
def set_unrecorded(self, user: User):
log_entry = super().set_unrecorded(user)
self.add_log_entry_to_compensations(log_entry)
return log_entry
def set_recorded(self, user: User) -> UserActionLogEntry:
log_entry = super().set_recorded(user)
@@ -259,11 +260,6 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
Returns:
"""
user_action_edit = UserActionLogEntry.get_edited_action(performing_user, comment=edit_comment)
self.log.add(user_action_edit)
self.modified = user_action_edit
self.save()
super().mark_as_edited(performing_user, request)
if self.checked:
self.set_unchecked()