From dcae60d491581dcf912fbd0237f4f87c4ad80314 Mon Sep 17 00:00:00 2001 From: Joel Addison Date: Thu, 3 Oct 2019 01:13:26 +1000 Subject: [PATCH] Fix price filter Label or help text could be unassigned, so convert to empty string. --- pinaxcon/templatetags/lca2019_tags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pinaxcon/templatetags/lca2019_tags.py b/pinaxcon/templatetags/lca2019_tags.py index 04993cbc..16779496 100644 --- a/pinaxcon/templatetags/lca2019_tags.py +++ b/pinaxcon/templatetags/lca2019_tags.py @@ -23,10 +23,12 @@ def has_price_fields(form): if isinstance(field, Form): return has_price_fields(field) - if '$' in field.field.help_text: + help_text = field.field.help_text or '' + if '$' in help_text: return True - if '$' in field.field.label: + label = field.field.label or '' + if '$' in label: return True choices = getattr(field.field, 'choices', [])