diff options
author | Håkon Solbjørg <hakon@solbj.org> | 2023-03-29 23:23:57 +0200 |
---|---|---|
committer | Håkon Solbjørg <hakon@solbj.org> | 2023-03-29 23:23:57 +0200 |
commit | 0e377d10c06765fab6467132b8ab58734a0b50a3 (patch) | |
tree | 23e1e883fa6d2b9234dd4f6fb57e7e07ab361f6c | |
parent | 2304baffdeaac54863d377ec048688b58d6ea29e (diff) |
fix(netbox2gondul): Use prefix__family for family lookup
-rw-r--r-- | tools/netbox/scripts/netbox2gondul/netbox2gondul.py | 4 |
1 files 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: |