# Unit test konova app
* adds unit test for konova app models * drops unused/unnecessary code fragments * updates translation
This commit is contained in:
@@ -279,22 +279,20 @@ class Intervention(BaseObject,
|
||||
revocation.delete()
|
||||
self.mark_as_edited(user, request=form.request, edit_comment=REVOCATION_REMOVED)
|
||||
|
||||
def mark_as_edited(self, performing_user: User, request: HttpRequest = None, edit_comment: str = None, reset_recorded: bool = True):
|
||||
""" In case the object or a related object changed, internal processes need to be started, such as
|
||||
unrecord and uncheck
|
||||
def mark_as_edited(self, performing_user: User, request: HttpRequest = None, edit_comment: str = None):
|
||||
""" Log the edit action
|
||||
|
||||
If the object is checked, set it to unchecked due to the editing. Another check is needed then.
|
||||
|
||||
Args:
|
||||
performing_user (User): The user which performed the editing action
|
||||
request (HttpRequest): The used request for this action
|
||||
edit_comment (str): Additional comment for the log entry
|
||||
reset_recorded (bool): Whether the record-state of the object should be reset
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
action = super().mark_as_edited(performing_user, edit_comment=edit_comment)
|
||||
if reset_recorded:
|
||||
self.unrecord(performing_user, request)
|
||||
if self.checked:
|
||||
self.set_unchecked()
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user