From f0c251c76e2377a976bd9d1588a53326c118d0ee Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 13 Mar 2017 11:25:06 -0400 Subject: [PATCH] Fix parent device position display --- netbox/templates/dcim/device.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/netbox/templates/dcim/device.html b/netbox/templates/dcim/device.html index 081397774..d38f60cb3 100644 --- a/netbox/templates/dcim/device.html +++ b/netbox/templates/dcim/device.html @@ -43,8 +43,10 @@ {% if device.parent_bay %} {% with device.parent_bay.device as parent %} - U{{ parent.position }} / {{ parent.get_face_display }} - ({{ parent }} - {{ device.parent_bay.name }}) + {{ parent }} {{ device.parent_bay.name }} + {% if parent.position %} + (U{{ parent.position }} / {{ parent.get_face_display }}) + {% endif %} {% endwith %} {% elif device.rack and device.position %} U{{ device.position }} / {{ device.get_face_display }}