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

Fixes #5533: Fix bulk editing of objects with required custom fields

This commit is contained in:
Jeremy Stretch
2020-12-28 11:10:27 -05:00
parent 6f39e6599d
commit cc1a43e5d9
2 changed files with 3 additions and 2 deletions

View File

@ -798,8 +798,8 @@ class BulkEditView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View):
# Update custom fields
for name in custom_fields:
if name in form.nullable_fields and name in nullified_fields:
obj.custom_field_data.pop(name, None)
else:
obj.custom_field_data[name] = None
elif form.cleaned_data.get(name) not in (None, ''):
obj.custom_field_data[name] = form.cleaned_data[name]
obj.full_clean()