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

Fixes : 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
docs/release-notes
netbox/extras

@ -3,6 +3,7 @@
## Bug Fixes
* [#4089](https://github.com/netbox-community/netbox/issues/4089) - Selection of power outlet type during bulk update is optional
* [#4091](https://github.com/netbox-community/netbox/issues/4091) - Fix filtering of objects by custom fields using UI search form
# v2.7.4 (2020-02-04)

@ -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)
#