Kaynağa Gözat

Fixes: #3531 - Fix FG Color for Rack Role

Daniel Sheppard 6 yıl önce
ebeveyn
işleme
6fdd35785e
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      netbox/dcim/tables.py

+ 2 - 1
netbox/dcim/tables.py

@@ -74,7 +74,8 @@ RACKROLE_ACTIONS = """
 
 RACK_ROLE = """
 {% if record.role %}
-    <label class="label" style="background-color: #{{ record.role.color }}">{{ value }}</label>
+    {% load helpers %}
+    <label class="label" style="color: {{ record.role.color|fgcolor }}; background-color: #{{ record.role.color }}">{{ value }}</label>
 {% else %}
     &mdash;
 {% endif %}