Merge pull request 'egon_sending_on_edit' (#263) from egon_sending_on_edit into master
Reviewed-on: SGD-Nord/konova#263
This commit is contained in:
commit
821141f2a8
@ -133,7 +133,6 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
|
|||||||
id__in=payments
|
id__in=payments
|
||||||
)
|
)
|
||||||
obj.payments.set(payments)
|
obj.payments.set(payments)
|
||||||
obj.send_data_to_egon()
|
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
def create_model_from_json(self, json_model, user):
|
def create_model_from_json(self, json_model, user):
|
||||||
@ -201,6 +200,7 @@ class InterventionAPISerializerV1(AbstractModelAPISerializerV1,
|
|||||||
obj.save()
|
obj.save()
|
||||||
|
|
||||||
obj.mark_as_edited(user, edit_comment="API update")
|
obj.mark_as_edited(user, edit_comment="API update")
|
||||||
|
obj.send_data_to_egon()
|
||||||
|
|
||||||
celery_update_parcels.delay(obj.geometry.id)
|
celery_update_parcels.delay(obj.geometry.id)
|
||||||
|
|
||||||
|
@ -385,6 +385,7 @@ class EditInterventionForm(NewInterventionForm):
|
|||||||
geometry = geom_form.save(user_action)
|
geometry = geom_form.save(user_action)
|
||||||
self.instance.geometry = geometry
|
self.instance.geometry = geometry
|
||||||
self.instance.save()
|
self.instance.save()
|
||||||
|
self.instance.send_data_to_egon()
|
||||||
|
|
||||||
return self.instance
|
return self.instance
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@ class NewInterventionDocumentModalForm(NewDocumentModalForm):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
doc = super().save(*args, **kwargs)
|
doc = super().save(*args, **kwargs)
|
||||||
|
|
||||||
if self.instance.payments.exists():
|
|
||||||
self.instance.send_data_to_egon()
|
self.instance.send_data_to_egon()
|
||||||
|
|
||||||
return doc
|
return doc
|
||||||
|
@ -145,11 +145,13 @@ class Intervention(BaseObject,
|
|||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
if self.payments.exists():
|
||||||
celery_export_to_egon.delay(self.id)
|
celery_export_to_egon.delay(self.id)
|
||||||
|
|
||||||
def set_recorded(self, user: User) -> UserActionLogEntry:
|
def set_recorded(self, user: User) -> UserActionLogEntry:
|
||||||
log_entry = super().set_recorded(user)
|
log_entry = super().set_recorded(user)
|
||||||
self.add_log_entry_to_compensations(log_entry)
|
self.add_log_entry_to_compensations(log_entry)
|
||||||
|
self.send_data_to_egon()
|
||||||
return log_entry
|
return log_entry
|
||||||
|
|
||||||
def add_log_entry_to_compensations(self, log_entry: UserActionLogEntry):
|
def add_log_entry_to_compensations(self, log_entry: UserActionLogEntry):
|
||||||
|
Loading…
Reference in New Issue
Block a user