mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-18 04:56:29 -06:00
Merge pull request #12839 from candlerb/candlerb/12838
Round rack power utilization to nearest 0.1%
This commit is contained in:
commit
43235f143d
@ -466,7 +466,7 @@ class Rack(PrimaryModel, WeightMixin):
|
|||||||
powerport.get_power_draw()['allocated'] for powerport in powerports
|
powerport.get_power_draw()['allocated'] for powerport in powerports
|
||||||
])
|
])
|
||||||
|
|
||||||
return int(allocated_draw / available_power_total * 100)
|
return round(allocated_draw / available_power_total * 100, 1)
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def total_weight(self):
|
def total_weight(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user