Update netbox/dcim/views.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Daniel Sheppard 2023-10-13 09:50:43 -05:00 committed by GitHub
parent e93d237147
commit 6e492f18b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,8 +127,7 @@ class BulkDisconnectView(GetReturnURLMixin, ObjectPermissionRequiredMixin, View)
for obj in self.queryset.filter(pk__in=form.cleaned_data['pk']):
if obj.cable is None:
continue
if obj.cable.pk not in cables:
cables.append(obj.cable.pk)
cables.add(obj.cable.pk)
count += 1
if len(cables) > 0: