From 129532b5473e7ca1b2d67b23f875cfbb41ab2f66 Mon Sep 17 00:00:00 2001 From: Brian Tiemann Date: Tue, 17 Dec 2024 14:52:08 -0500 Subject: [PATCH] Check far_ends rather than altering draw_far_objects --- netbox/dcim/svg/cables.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/netbox/dcim/svg/cables.py b/netbox/dcim/svg/cables.py index dd6e82c9b..58fa27c6b 100644 --- a/netbox/dcim/svg/cables.py +++ b/netbox/dcim/svg/cables.py @@ -268,10 +268,6 @@ class CableTraceSVG: """ Draw the far-end objects and its terminations and return all created nodes """ - # If an empty list is passed in, return empty results so this cable can be skipped - if not len(obj_list): - return [], [] - # Make sure elements are sorted by name for readability objects = sorted(obj_list, key=lambda x: str(x)) width = self.width / len(objects) @@ -366,15 +362,10 @@ class CableTraceSVG: self.cursor += CABLE_HEIGHT # Connector (a Cable or WirelessLink) - if links: + if links and far_ends: obj_list = {end.parent_object for end in far_ends} parent_object_nodes, far_terminations = self.draw_far_objects(obj_list, far_ends) - - # If there are no far terminations, this segment can't be rendered, so skip. - if not far_terminations: - continue - for cable in links: # Fill in labels and description with all available data description = [