fix: avoid collision with NetBox Rack.units property
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<div class="rack-face-title">{{ face_label }}</div>
|
||||
<div class="rack-frame" style="--rack-units: {{ rack.u_height }}">
|
||||
<div class="rack-unit-labels">
|
||||
{% for unit in rack.units %}<span>{{ unit }}</span>{% endfor %}
|
||||
{% for unit in rack.elevation_unit_labels %}<span>{{ unit }}</span>{% endfor %}
|
||||
</div>
|
||||
<div class="rack-device-area">
|
||||
{% for device in rack.elevation_devices %}
|
||||
|
||||
@@ -964,7 +964,7 @@ class RackElevationView(PermissionRequiredMixin, View):
|
||||
|
||||
for rack in rack_list:
|
||||
rack.elevation_devices = rack_devices[rack.pk]
|
||||
rack.units = range(rack.u_height or 0, 0, -1)
|
||||
rack.elevation_unit_labels = range(rack.u_height or 0, 0, -1)
|
||||
|
||||
cable_rows = []
|
||||
if device_ids:
|
||||
|
||||
Reference in New Issue
Block a user