EGON GML Payment date
* fixes bug where missing payment date would result in no egon message sent
This commit is contained in:
parent
2689e73d3a
commit
c3350bb9bc
@ -67,6 +67,7 @@ class EgonGmlBuilder:
|
||||
"""
|
||||
intervention = None
|
||||
gml = None
|
||||
_PAYMENT_FALLBACK_DATE = ""
|
||||
|
||||
def __init__(self, intervention):
|
||||
self.intervention = intervention
|
||||
@ -164,7 +165,10 @@ class EgonGmlBuilder:
|
||||
payment_date = None
|
||||
if payment is not None:
|
||||
payment_date = payment.due_on
|
||||
if payment_date is not None:
|
||||
payment_date = payment_date.strftime(DEFAULT_DATE_FORMAT)
|
||||
else:
|
||||
payment_date = self._PAYMENT_FALLBACK_DATE
|
||||
|
||||
cons_office = self.intervention.responsible.conservation_office
|
||||
reg_office = self.intervention.responsible.registration_office
|
||||
|
Loading…
Reference in New Issue
Block a user