From a2007a4728faafeee5c296afabc116707db42344 Mon Sep 17 00:00:00 2001 From: Derick Vigne Date: Wed, 16 Nov 2022 09:57:49 -0500 Subject: [PATCH] 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 --- netbox/dcim/svg/cables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/svg/cables.py b/netbox/dcim/svg/cables.py index 9a847acc9..33adef798 100644 --- a/netbox/dcim/svg/cables.py +++ b/netbox/dcim/svg/cables.py @@ -166,7 +166,7 @@ class CableTraceSVG: """ if hasattr(instance, 'parent_object'): # Termination - return 'f0f0f0' + return getattr(instance, 'color', 'f0f0f0') or 'f0f0f0' if hasattr(instance, 'device_role'): # Device return instance.device_role.color