Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Dec 1, 2023
1 parent bdb2e34 commit 7519f1a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
6.1.4 (unreleased)
------------------

- Nothing changed yet.
- Fix check_persone. When there are no relation.
[mamico]


6.1.3 (2023-11-28)
Expand Down
17 changes: 9 additions & 8 deletions src/design/plone/contenttypes/browser/utils/check_persone.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ def information_dict(self, persona):
if persona.incarichi_persona:

relations = self.get_related_objects(persona, "incarichi_persona")
rel_data = relations[0]

if (
rel_data["data_inizio_incarico"]
and rel_data["title"].strip()
and rel_data["tipologia_incarico"]
):
incarichi_persona = FLAG
if relations:
rel_data = relations[0]

if (
rel_data["data_inizio_incarico"]
and rel_data["title"].strip()
and rel_data["tipologia_incarico"]
):
incarichi_persona = FLAG

return {
"incarichi_persona": incarichi_persona,
Expand Down

0 comments on commit 7519f1a

Please sign in to comment.