Fix crash in invoice address detection (PRETIXEU-8XE)

This commit is contained in:
Raphael Michel
2023-08-28 11:45:13 +02:00
parent f7d4460deb
commit 5398671fde

View File

@@ -1038,7 +1038,7 @@ class QuestionsStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
def reduce_initial(v): def reduce_initial(v):
if isinstance(v, dict): if isinstance(v, dict):
# try to flatten objects such as name_parts to a single string to determine whether they have any value set # try to flatten objects such as name_parts to a single string to determine whether they have any value set
return ''.join([v for k, v in v.items() if not k.startswith('_')]) return ''.join([v for k, v in v.items() if not k.startswith('_') and v])
else: else:
return v return v