diff --git a/lib/netbox_client_ruby/api/ipam/ip_address.rb b/lib/netbox_client_ruby/api/ipam/ip_address.rb index 152115c..16cd5ed 100644 --- a/lib/netbox_client_ruby/api/ipam/ip_address.rb +++ b/lib/netbox_client_ruby/api/ipam/ip_address.rb @@ -38,7 +38,7 @@ def interface return nil unless interface_data - if interface_data.key? ('virtual_machine') + if interface_data.key? ('virtual_machine') and not interface_data['virtual_machine'].nil? Virtualization::Interface.new interface_data['id'] else DCIM::Interface.new interface_data['id']