1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix bug with path padding

This commit is contained in:
jeremystretch
2022-06-27 15:28:03 -04:00
parent 7622d90c1d
commit 9d35a9d912
3 changed files with 5 additions and 7 deletions

View File

@ -429,7 +429,6 @@ class Rack(NetBoxModel):
"""
powerfeeds = PowerFeed.objects.filter(rack=self)
available_power_total = sum(pf.available_power for pf in powerfeeds)
print(f'available_power_total: {available_power_total}')
if not available_power_total:
return 0
@ -442,7 +441,6 @@ class Rack(NetBoxModel):
allocated_draw = 0
for powerport in powerports:
allocated_draw += powerport.get_power_draw()['allocated']
print(f'allocated_draw: {allocated_draw}')
return int(allocated_draw / available_power_total * 100)