mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 19:08:38 -06:00
Update netbox/utilities/templatetags/form_helpers.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
f257f4aad4
commit
8a7df0b98d
@ -36,11 +36,7 @@ def getfield(form, fieldname):
|
||||
|
||||
@register.filter()
|
||||
def get_filter_field(form, fieldname):
|
||||
field = getfield(form, f'{fieldname}')
|
||||
if field is not None:
|
||||
return field
|
||||
else:
|
||||
return getfield(form, f'{fieldname}_id')
|
||||
return getfield(form, f'{fieldname}') or getfield(form, f'{fieldname}_id')
|
||||
|
||||
|
||||
@register.filter(name='widget_type')
|
||||
|
Loading…
Reference in New Issue
Block a user