Переглянути джерело

Update netbox/netbox/api/viewsets/mixins.py

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
bctiemann 1 місяць тому
батько
коміт
63984e693c
1 змінених файлів з 0 додано та 1 видалено
  1. 0 1
      netbox/netbox/api/viewsets/mixins.py

+ 0 - 1
netbox/netbox/api/viewsets/mixins.py

@@ -378,7 +378,6 @@ class BulkDestroyModelMixin:
                     protected = list(
                     protected = list(
                         e.protected_objects if isinstance(e, ProtectedError) else e.restricted_objects
                         e.protected_objects if isinstance(e, ProtectedError) else e.restricted_objects
                     )
                     )
-                    n = len(protected)
                     # Report only the count, not names or PKs, to keep each per-object error
                     # Report only the count, not names or PKs, to keep each per-object error
                     # entry small in a batch response. Note: the single-object delete endpoint
                     # entry small in a batch response. Note: the single-object delete endpoint
                     # (NetBoxModelViewSet.dispatch()) does include names and PKs of dependent
                     # (NetBoxModelViewSet.dispatch()) does include names and PKs of dependent