Skip to content

Commit

Permalink
Fix matching when MAC is None
Browse files Browse the repository at this point in the history
  • Loading branch information
dupondje committed Aug 22, 2023
1 parent 57fb655 commit 72509fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/sources/openstack/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ def add_device_vm_to_inventory(self, object_type, object_data, pnic_data=None, v
# on VMs vnic data is used, on physical devices pnic data is used
mac_source_data = vnic_data if object_type == NBVM else pnic_data

nic_macs = [x.get("mac_address") for x in mac_source_data.values()]
nic_macs = [x.get("mac_address") for x in mac_source_data.values() if x.get("mac_address") is not None]

device_vm_object = self.get_object_based_on_macs(object_type, nic_macs)

Expand Down

0 comments on commit 72509fb

Please sign in to comment.