# Unit test konova app

* adds unit test for konova app models
* drops unused/unnecessary code fragments
* updates translation
This commit is contained in:
2023-09-08 12:47:50 +02:00
parent 530ceb3876
commit 89efc33d75
11 changed files with 255 additions and 85 deletions

View File

@@ -421,19 +421,18 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
)
return docs
def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None, reset_recorded: bool = True):
""" Performs internal logic for setting the recordedd/checked state of the related intervention
def mark_as_edited(self, user: User, request: HttpRequest = None, edit_comment: str = None):
""" Performs internal logic for setting the checked state of the related intervention
Args:
user (User): The performing user
request (HttpRequest): The performing request
edit_comment (str): Additional comment for the log entry
reset_recorded (bool): Whether the record-state of the object should be reset
Returns:
"""
self.intervention.unrecord(user, request)
self.intervention.set_unchecked()
action = super().mark_as_edited(user, edit_comment=edit_comment)
return action