1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #4091: Fix filtering of objects by custom fields using UI search form

This commit is contained in:
Jeremy Stretch
2020-02-05 16:39:42 -05:00
parent 3f2c74f5e7
commit 68738e683a
2 changed files with 3 additions and 1 deletions

View File

@@ -133,7 +133,8 @@ class CustomFieldFilterForm(forms.Form):
filter_logic=CustomFieldFilterLogicChoices.FILTER_DISABLED
)
for cf in custom_fields:
self.fields[cf.name] = cf.to_form_field(set_initial=True, enforce_required=False)
field_name = 'cf_{}'.format(cf.name)
self.fields[field_name] = cf.to_form_field(set_initial=True, enforce_required=False)
#