Fix price filter

Label or help text could be unassigned, so convert to empty string.
This commit is contained in:
Joel Addison 2019-10-03 01:13:26 +10:00
parent 94f8837288
commit dcae60d491

View file

@ -23,10 +23,12 @@ def has_price_fields(form):
if isinstance(field, Form): if isinstance(field, Form):
return has_price_fields(field) return has_price_fields(field)
if '$' in field.field.help_text: help_text = field.field.help_text or ''
if '$' in help_text:
return True return True
if '$' in field.field.label: label = field.field.label or ''
if '$' in label:
return True return True
choices = getattr(field.field, 'choices', []) choices = getattr(field.field, 'choices', [])