API Celery parcel calculation fix

* fixes bug where API stored data would not have parcels be calculated correctly
This commit is contained in:
2022-09-28 12:24:06 +02:00
parent 66a2387791
commit 0e9f0ba53e
4 changed files with 27 additions and 27 deletions

View File

@@ -125,11 +125,11 @@ class CompensationAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensa
obj = self._set_compensation_states(obj, properties["after_states"], obj.after_states)
obj = self._set_deadlines(obj, properties["deadlines"])
obj.log.add(obj.created)
obj.log.add(obj.created)
celery_update_parcels.delay(obj.geometry.id)
celery_update_parcels.delay(obj.geometry.id)
return obj.id
return obj.id
def update_model_from_json(self, id, json_model, user):
""" Updates an entry for the model based on the contents of json_model
@@ -165,8 +165,8 @@ class CompensationAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensa
obj = self._set_compensation_states(obj, properties["after_states"], obj.after_states)
obj = self._set_deadlines(obj, properties["deadlines"])
obj.log.add(update_action)
obj.log.add(update_action)
celery_update_parcels.delay(obj.geometry.id)
celery_update_parcels.delay(obj.geometry.id)
return obj.id
return obj.id