From 9b18b877d588bf71f70470e748ca5aa08f39b945 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Fri, 28 Jan 2022 15:55:00 +0100 Subject: [PATCH] #31 API Deductions * adds intervention check state reset to all deduction-changing API routes --- api/utils/serializer/v1/deduction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/utils/serializer/v1/deduction.py b/api/utils/serializer/v1/deduction.py index bfa2be65..c66a2129 100644 --- a/api/utils/serializer/v1/deduction.py +++ b/api/utils/serializer/v1/deduction.py @@ -79,6 +79,7 @@ class DeductionAPISerializerV1(AbstractModelAPISerializerV1, account=acc, surface=surface ) + deduction.intervention.mark_as_edited(user) return str(deduction.id) def _get_obj_from_db(self, id, user): @@ -140,6 +141,8 @@ class DeductionAPISerializerV1(AbstractModelAPISerializerV1, deduction.surface = surface deduction.save() + deduction.intervention.mark_as_edited(user) + return str(deduction.id) def delete_entry(self, id, user):