From 8c9edaebaa3be2c0c90797b8f848b430102f2287 Mon Sep 17 00:00:00 2001 From: Adrian Wittwer Date: Thu, 14 Dec 2023 17:22:16 +0100 Subject: [PATCH] fix: only save updated fields in post_complete case logic --- caluma/caluma_workflow/domain_logic.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/caluma/caluma_workflow/domain_logic.py b/caluma/caluma_workflow/domain_logic.py index 8a1932e5e..f64b2c45b 100644 --- a/caluma/caluma_workflow/domain_logic.py +++ b/caluma/caluma_workflow/domain_logic.py @@ -210,7 +210,14 @@ def post_complete( case.closed_at = timezone.now() case.closed_by_user = user.username case.closed_by_group = user.group - case.save() + case.save( + update_fields=[ + "status", + "closed_at", + "closed_by_user", + "closed_by_group", + ] + ) send_event( events.post_complete_case,