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

Fixes #4880: Fix remove untagged-vlans if not assigned in bulk interfaces edit

This commit is contained in:
kobayashi
2020-07-23 01:36:31 -04:00
parent 9f4c1e64ce
commit a12d94a3bc
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@
* [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments * [#4875](https://github.com/netbox-community/netbox/issues/4875) - Fix documentation for image attachments
* [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status * [#4876](https://github.com/netbox-community/netbox/issues/4876) - Fix labels for sites in staging or decommissioning status
* [#4880](https://github.com/netbox-community/netbox/issues/4880) - Fix remove tagged vlans if not assigned in bulk interface editting
--- ---

View File

@ -721,8 +721,8 @@ class BulkEditView(GetReturnURLMixin, View):
# ManyToManyFields # ManyToManyFields
elif isinstance(model_field, ManyToManyField): elif isinstance(model_field, ManyToManyField):
getattr(obj, name).set(form.cleaned_data[name]) if form.cleaned_data[name].count() > 0:
getattr(obj, name).set(form.cleaned_data[name])
# Normal fields # Normal fields
elif form.cleaned_data[name] not in (None, ''): elif form.cleaned_data[name] not in (None, ''):
setattr(obj, name, form.cleaned_data[name]) setattr(obj, name, form.cleaned_data[name])