15524 round iprange utilization (#15734)

This commit is contained in:
Arthur Hanson 2024-04-29 10:19:57 -07:00 committed by GitHub
parent 3cbade536e
commit cbfed83f60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -692,7 +692,7 @@ class IPRange(PrimaryModel):
ip.address.ip for ip in self.get_child_ips() ip.address.ip for ip in self.get_child_ips()
]).size ]).size
return int(float(child_count) / self.size * 100) return min(float(child_count) / self.size * 100, 100)
class IPAddress(PrimaryModel): class IPAddress(PrimaryModel):