Parcourir la source

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

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
bctiemann il y a 2 mois
Parent
commit
3df0bc8e62
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      netbox/netbox/api/viewsets/mixins.py

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

@@ -389,7 +389,7 @@ class BulkDestroyModelMixin:
                         'errors': {
                         'errors': {
                             '__all__': _(
                             '__all__': _(
                                 'Unable to delete: {n} dependent object(s) prevent deletion.'
                                 'Unable to delete: {n} dependent object(s) prevent deletion.'
-                            ).format(n=n),
+                            ).format(n=len(protected)),
                         },
                         },
                     })
                     })
             if errors:
             if errors: