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
PeterO2 authored and thde committed Oct 28, 2024
1 parent 89d6252 commit bf52317
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 @@ -34,7 +34,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 bf52317

Please sign in to comment.