Przeglądaj źródła

Fixes #13105: Avoid exception when attempting to allocate next available IP address from prefix marked as utilized

Jeremy Stretch 2 lat temu
rodzic
commit
73348ee435
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      netbox/ipam/models/ip.py

+ 1 - 1
netbox/ipam/models/ip.py

@@ -406,7 +406,7 @@ class Prefix(GetAvailablePrefixesMixin, PrimaryModel):
         Return all available IPs within this prefix as an IPSet.
         """
         if self.mark_utilized:
-            return list()
+            return netaddr.IPSet()
 
         prefix = netaddr.IPSet(self.prefix)
         child_ips = netaddr.IPSet([ip.address.ip for ip in self.get_child_ips()])