Skip to content

Commit

Permalink
Merge pull request #205 from RedTurtle/us_45378_campi_incarico_persona
Browse files Browse the repository at this point in the history
fix: added dates for incarico persona
  • Loading branch information
deodorhunter authored Sep 5, 2023
2 parents 68e4f8f + c631bae commit 6610abf
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/design/plone/contenttypes/restapi/serializers/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ def __call__(self, force_all_metadata=False):
latitude = res.get("latitude", 0)
longitude = res.get("longitude", 0)
if latitude and longitude:
res["geolocation"] = {"latitude": latitude, "longitude": longitude}
res["geolocation"] = {
"latitude": latitude,
"longitude": longitude,
}

res["id"] = self.context.id

Expand Down Expand Up @@ -255,6 +258,18 @@ def __call__(self, force_all_metadata=False):
else:
res["data_inizio_incarico"] = json_compatible(None)

if "data_conclusione_incarico" not in res:
res["data_conclusione_incarico"] = json_compatible(
self.context.data_conclusione_incarico
)
else:
res["data_conclusione_incarico"] = json_compatible(None)

if "data_insediamento" not in res:
res["data_insediamento"] = json_compatible(self.context.data_insediamento)
else:
res["data_insediamento"] = json_compatible(None)

if "compensi" not in res:
res["compensi"] = json_compatible(self.context.compensi)
else:
Expand Down

0 comments on commit 6610abf

Please sign in to comment.