From bec301eb9d2b17eb8b6b0db4561621507dbe351e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 28 Sep 2023 15:50:04 +0200 Subject: [PATCH] fix provider network error (#394) --- netbox_topology_views/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netbox_topology_views/views.py b/netbox_topology_views/views.py index 81615b6..aff3840 100644 --- a/netbox_topology_views/views.py +++ b/netbox_topology_views/views.py @@ -5,7 +5,7 @@ from itertools import chain from utilities.htmx import is_htmx -from circuits.models import Circuit, CircuitTermination +from circuits.models import Circuit, CircuitTermination, ProviderNetwork from dcim.models import ( Cable, CableTermination, @@ -374,7 +374,8 @@ def get_topology_data( ) for path_complete_interface in path_complete_interfaces: for connected_endpoint in path_complete_interface.connected_endpoints: - device_ids.append(connected_endpoint.device.id) + if type(connected_endpoint) != ProviderNetwork: + device_ids.append(connected_endpoint.device.id) if show_circuit: circuit_terminations = CircuitTermination.objects.filter(