From 0e377d10c06765fab6467132b8ab58734a0b50a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Wed, 29 Mar 2023 23:23:57 +0200 Subject: fix(netbox2gondul): Use prefix__family for family lookup --- tools/netbox/scripts/netbox2gondul/netbox2gondul.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py index 833a35a..758d304 100644 --- a/tools/netbox/scripts/netbox2gondul/netbox2gondul.py +++ b/tools/netbox/scripts/netbox2gondul/netbox2gondul.py @@ -159,8 +159,8 @@ class Netbox2Gondul(Script): traffic_vlan_name = None try: traffic_vlan = VLAN.objects.get(name=device.name) - traffic_prefix_v4 = Prefix.objects.get(vlan=traffic_vlan, family=4) - traffic_prefix_v6 = Prefix.objects.get(vlan=traffic_vlan, family=6) + traffic_prefix_v4 = Prefix.objects.get(vlan=traffic_vlan, prefix__family=4) + traffic_prefix_v6 = Prefix.objects.get(vlan=traffic_vlan, prefix__family=6) self.network_to_gondul(traffic_vlan, traffic_prefix_v4, traffic_prefix_v6) except VLAN.DoesNotExist: -- cgit v1.2.3