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

#9096: Correct getattr() call

This commit is contained in:
jeremystretch
2022-04-12 08:13:08 -04:00
parent 517d0158b6
commit 27a9313396

View File

@ -146,7 +146,7 @@ def get_selected_values(form, field_name):
# If the field has a `null_option` attribute set and it is selected,
# add it to the field's grouped choices.
if getattr(field, 'null_option') and None in filter_data:
if getattr(field, 'null_option', None) and None in filter_data:
values.remove(None)
values.insert(0, field.null_option)