Skip to content

Commit

Permalink
Fix: ipam interface should check on virtualmachine nil state
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Oorthuijsen committed Feb 13, 2020
1 parent 4c0bde9 commit af7e7fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netbox_client_ruby/api/ipam/ip_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit af7e7fa

Please sign in to comment.