We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89d6252 commit bf4a644Copy full SHA for bf4a644
lib/netbox_client_ruby/api/ipam/ip_address.rb
@@ -33,12 +33,8 @@ def interface
33
interface_data = data['interface']
34
35
return nil unless interface_data
36
-
37
- if interface_data.key?('virtual_machine')
38
- Virtualization::Interface.new interface_data['id']
39
- else
40
- DCIM::Interface.new interface_data['id']
41
- end
+ return Virtualization::Interface.new interface_data['id'] unless interface_data.dig('virtual_machine').nil?
+ return DCIM::Interface.new interface_data['id']
42
end
43
44
0 commit comments