fix: avoid collision with NetBox Rack.units property

This commit is contained in:
2026-07-22 09:35:55 +02:00
parent fccc54e75e
commit a967f88401
2 changed files with 2 additions and 2 deletions
@@ -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 %}
+1 -1
View File
@@ -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: