mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 08:38:16 -06:00
Minor cleanup
This commit is contained in:
parent
2468628ed9
commit
5b795f6f90
@ -424,9 +424,8 @@ class PowerPort(CableTermination, ComponentModel):
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Calculate per-leg aggregates for three-phase feeds
|
# Calculate per-leg aggregates for three-phase feeds
|
||||||
if (leg_stats and self._connected_powerfeed and
|
if leg_stats and getattr(self._connected_powerfeed, 'phase', None) == PowerFeedPhaseChoices.PHASE_3PHASE:
|
||||||
self._connected_powerfeed.phase == PowerFeedPhaseChoices.PHASE_3PHASE):
|
for leg, leg_name in PowerOutletFeedLegChoices:
|
||||||
for leg, leg_name in PowerOutletFeedLegChoices.CHOICES:
|
|
||||||
outlet_count, allocated_draw_total, maximum_draw_total = get_power_stats(leg)
|
outlet_count, allocated_draw_total, maximum_draw_total = get_power_stats(leg)
|
||||||
ret['legs'].append({
|
ret['legs'].append({
|
||||||
'name': leg_name,
|
'name': leg_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user