Skip to content

Commit a2007a4

Browse files
Closes #10904: Added Colors to SVG for Front and Rear Ports (#10905)
* Added Colors to SVG for Front and Reaer Ports Fix for feature request 10904 thanks to @TheZackCodec * Simplify termination color resolution Co-authored-by: jeremystretch <[email protected]>
1 parent 316c380 commit a2007a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/dcim/svg/cables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _get_color(cls, instance):
166166
"""
167167
if hasattr(instance, 'parent_object'):
168168
# Termination
169-
return 'f0f0f0'
169+
return getattr(instance, 'color', 'f0f0f0') or 'f0f0f0'
170170
if hasattr(instance, 'device_role'):
171171
# Device
172172
return instance.device_role.color

0 commit comments

Comments
 (0)