#31 API Deductions

* adds intervention check state reset to all deduction-changing API routes
This commit is contained in:
mpeltriaux 2022-01-28 15:55:00 +01:00
parent 4c98949ba3
commit c32911755a

View File

@ -79,6 +79,7 @@ class DeductionAPISerializerV1(AbstractModelAPISerializerV1,
account=acc, account=acc,
surface=surface surface=surface
) )
deduction.intervention.mark_as_edited(user)
return str(deduction.id) return str(deduction.id)
def _get_obj_from_db(self, id, user): def _get_obj_from_db(self, id, user):
@ -140,6 +141,8 @@ class DeductionAPISerializerV1(AbstractModelAPISerializerV1,
deduction.surface = surface deduction.surface = surface
deduction.save() deduction.save()
deduction.intervention.mark_as_edited(user)
return str(deduction.id) return str(deduction.id)
def delete_entry(self, id, user): def delete_entry(self, id, user):