Fixes #7739: Fix exception when tracing cable across circuit with no far end termination

This commit is contained in:
jeremystretch 2021-11-15 12:41:57 -05:00
parent e5900a3fe3
commit f32e694499
2 changed files with 12 additions and 10 deletions

View File

@ -12,7 +12,8 @@
### Bug Fixes ### Bug Fixes
* [#7729](https://github.com/netbox-community/netbox/issues/7229) - Fix permissions evaluation when displaying VLAN group VLANs table * [#7729](https://github.com/netbox-community/netbox/issues/7729) - Fix permissions evaluation when displaying VLAN group VLANs table
* [#7739](https://github.com/netbox-community/netbox/issues/7739) - Fix exception when tracing cable across circuit with no far end termination
* [#7813](https://github.com/netbox-community/netbox/issues/7813) - Fix handling of errors during export template rendering * [#7813](https://github.com/netbox-community/netbox/issues/7813) - Fix handling of errors during export template rendering
--- ---

View File

@ -442,15 +442,16 @@ class CableTraceSVG:
parent_objects.append(parent_object) parent_objects.append(parent_object)
# Near end termination # Near end termination
termination = self._draw_box( if near_end is not None:
width=self.width * .8, termination = self._draw_box(
color=self._get_color(near_end), width=self.width * .8,
url=near_end.get_absolute_url(), color=self._get_color(near_end),
labels=self._get_labels(near_end), url=near_end.get_absolute_url(),
y_indent=PADDING, labels=self._get_labels(near_end),
radius=5 y_indent=PADDING,
) radius=5
terminations.append(termination) )
terminations.append(termination)
# Connector (either a Cable or attachment to a ProviderNetwork) # Connector (either a Cable or attachment to a ProviderNetwork)
if connector is not None: if connector is not None: