Fix NetBox 3 changed API keys
NetBoxAPI v3 deprecated attribute display_name
This commit is contained in:
parent
90b644f921
commit
1295947d5f
@ -74,7 +74,7 @@ def net_nodes():
|
||||
'firstseen': lastseen.isoformat(),
|
||||
'lastseen': lastseen.isoformat(),
|
||||
'nodeinfo': {
|
||||
'hostname': node.display_name,
|
||||
'hostname': node.name if node.name else f"Unnamed Device ({node.id})",
|
||||
'node_id': str(node.id),
|
||||
'network': { 'mac': node.name, 'addresses': addresses },
|
||||
'mesh_interfaces': [node.name],
|
||||
|
Loading…
Reference in New Issue
Block a user