* adds workflow tests for compensation checking and recording
* improves related code
This commit is contained in:
2021-11-11 13:13:05 +01:00
parent 796990ffbc
commit ffadfa2f47
6 changed files with 238 additions and 32 deletions

View File

@@ -235,16 +235,7 @@ class CheckModalForm(BaseModalForm):
"""
with transaction.atomic():
user_action = UserActionLogEntry.objects.create(
user=self.user,
action=UserAction.CHECKED
)
# Replace old checked
if self.instance.checked:
self.instance.checked.delete()
self.instance.checked = user_action
self.instance.log.add(user_action)
self.instance.save()
self.instance.toggle_checked(self.user)
# Send message to the SSO server
messenger = Messenger(