#149 Send on changes
* changes trigger for sending data to EGON: on each new payment, edited payment or deleted payment action, the data will be sent to EGON instead only once on "recording"
This commit is contained in:
@@ -145,7 +145,6 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
|
||||
def set_recorded(self, user: User) -> UserActionLogEntry:
|
||||
log_entry = super().set_recorded(user)
|
||||
self.add_log_entry_to_compensations(log_entry)
|
||||
self.send_data_to_egon()
|
||||
return log_entry
|
||||
|
||||
def add_log_entry_to_compensations(self, log_entry: UserActionLogEntry):
|
||||
@@ -183,6 +182,8 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
|
||||
intervention=self,
|
||||
)
|
||||
self.mark_as_edited(user, form.request, edit_comment=PAYMENT_ADDED)
|
||||
|
||||
self.send_data_to_egon()
|
||||
return pay
|
||||
|
||||
def add_revocation(self, form):
|
||||
@@ -347,6 +348,7 @@ class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, Chec
|
||||
with transaction.atomic():
|
||||
payment.delete()
|
||||
self.mark_as_edited(user, request=form.request, edit_comment=PAYMENT_REMOVED)
|
||||
self.send_data_to_egon()
|
||||
|
||||
|
||||
class InterventionDocument(AbstractDocument):
|
||||
|
||||
Reference in New Issue
Block a user