* adds support for GET /check on intervention to run checks automatically via API
This commit is contained in:
2022-01-25 09:29:14 +01:00
parent 096688fad5
commit 0b723b1529
8 changed files with 132 additions and 35 deletions

View File

@@ -182,7 +182,6 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
# Fill in data to objects
properties = json_model["properties"]
obj.title = properties["title"]
obj.modified = update_action
self.set_responsibility(obj, properties.get("responsible", None))
self.set_legal(obj, properties.get("legal", None))
self.set_payments(obj, properties.get("payments", None))
@@ -194,7 +193,7 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
obj.legal.save()
obj.save()
obj.log.add(update_action)
obj.mark_as_edited(user)
celery_update_parcels.delay(obj.geometry.id)