feat: Update dateOfBirth mapping and enhance rowId handling in sync process for Beteiligte
This commit is contained in:
@@ -140,10 +140,11 @@ class BeteiligteMapper:
|
||||
if zusatz:
|
||||
espo_data['zusatz'] = zusatz
|
||||
|
||||
# GEBURTSDATUM
|
||||
# GEBURTSDATUM (nur Datum-Teil ohne Zeit)
|
||||
geburtsdatum = advo_entity.get('geburtsdatum')
|
||||
if geburtsdatum:
|
||||
espo_data['dateOfBirth'] = geburtsdatum
|
||||
# Advoware gibt '2001-01-05T00:00:00', EspoCRM will nur '2001-01-05'
|
||||
espo_data['dateOfBirth'] = geburtsdatum.split('T')[0] if 'T' in geburtsdatum else geburtsdatum
|
||||
|
||||
# HINWEIS: handelsRegisterNummer und registergericht werden NICHT gemappt
|
||||
# Advoware ignoriert diese Felder im PUT (trotz Swagger Schema)
|
||||
@@ -151,6 +152,9 @@ class BeteiligteMapper:
|
||||
|
||||
logger.debug(f"Mapped to EspoCRM STAMMDATEN: name={espo_data.get('name')}")
|
||||
|
||||
# WICHTIG: Entferne None-Werte (EspoCRM mag keine expliziten None bei required fields)
|
||||
espo_data = {k: v for k, v in espo_data.items() if v is not None}
|
||||
|
||||
return espo_data
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user