Merge pull request 'master' (#261) from master into Docker

Reviewed-on: SGD-Nord/konova#261
This commit is contained in:
mpeltriaux 2022-12-02 06:43:28 +01:00
commit cd99743d1e

View File

@ -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
payment_date = payment_date.strftime(DEFAULT_DATE_FORMAT)
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