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

Fixes #5136: Fix exception when bulk editing interface 802.1Q mode

This commit is contained in:
Jeremy Stretch
2020-09-16 13:07:55 -04:00
parent e983f44fd3
commit 43f1fbf5b3
2 changed files with 2 additions and 1 deletions

View File

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