Skip to content

Commit 7d9799e

Browse files
committed
Get a None rather than empty list when there are no ip addresses
1 parent 18b3fe0 commit 7d9799e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/understack-workflows/understack_workflows/nautobot_device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def parse_device(data: dict) -> NautobotDevice:
280280

281281
def parse_interface(data: dict) -> NautobotInterface:
282282
connected = data["connected_interface"]
283-
ip_address = data["ip_addresses"] and data["ip_addresses"][0]
283+
ip_address = data["ip_addresses"][0] if data["ip_addresses"] else None
284284
return NautobotInterface(
285285
id=data["id"],
286286
name=data["name"],

0 commit comments

Comments
 (0)