Skip to content

Commit

Permalink
improved check on address
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti committed Nov 23, 2023
1 parent 559d2bb commit a68407e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/design/plone/contenttypes/browser/utils/check_luoghi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ def is_anonymous(self):

def information_dict(self, luogo):
indirizzo = False
if luogo.city.strip() and luogo.street.strip() and luogo.zip_code.strip():
indirizzo = True
if getattr(luogo, "city", "") and luogo.city.strip():
if getattr(luogo, "street", "") and luogo.street.strip():
if getattr(luogo, "zip_code", "") and luogo.zip_code.strip():
indirizzo = True

modalita_accesso = getattr(luogo, "modalita_accesso", "")
res = [x.get("text", "") for x in modalita_accesso["blocks"].values()]
Expand Down

0 comments on commit a68407e

Please sign in to comment.