From e44fd2fe78d3b00a7e7722a9ebd6f89abea90d27 Mon Sep 17 00:00:00 2001 From: clbu Date: Wed, 16 Oct 2024 10:44:08 +0200 Subject: [PATCH] fix(network): retrieve switch interface using id instead of name --- netbox_agent/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_agent/network.py b/netbox_agent/network.py index ff1a8bf..41db084 100644 --- a/netbox_agent/network.py +++ b/netbox_agent/network.py @@ -544,7 +544,7 @@ class ServerNetwork(Network): switch_interface = self.lldp.get_switch_port(nb_server_interface.name) nb_switch_interface = nb.dcim.interfaces.get( - device=nb_switch, + device_id=nb_switch.id, name=switch_interface, ) if nb_switch_interface is None: