fix to avoid setting interface data for a mac to the string None, when not present

This commit is contained in:
Blake Harnden 2020-07-16 08:59:57 -07:00
parent d1fd19edc6
commit 1212e5ddf8
2 changed files with 6 additions and 3 deletions

View file

@ -1050,8 +1050,9 @@ class CoreNetworkBase(NodeBase):
if uni:
unidirectional = 1
mac = str(iface.mac) if iface.mac else None
iface2_data = InterfaceData(
id=linked_node.get_iface_id(iface), name=iface.name, mac=str(iface.mac)
id=linked_node.get_iface_id(iface), name=iface.name, mac=mac
)
ip4 = iface.get_ip4()
if ip4: