Fix price filter
Label or help text could be unassigned, so convert to empty string.
This commit is contained in:
parent
94f8837288
commit
dcae60d491
1 changed files with 4 additions and 2 deletions
|
@ -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', [])
|
||||||
|
|
Loading…
Reference in a new issue