Skip to content

Commit

Permalink
Use .dig() to simplify test code
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Jul 15, 2024
1 parent 1e1b1ff commit 24b27e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/fog/libvirt/requests/compute/dhcp_leases.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ def dhcp_leases(uuid, mac, flags = 0)
'dd8fe884-6c02-601e-7551-cca97df1c5df' => leases1,
'fbd4ac68-cbea-4f95-86ed-22953fd92384' => leases2
}
if !networks[uuid].nil?
return networks[uuid][mac]
end
networks.dig(uuid, mac)
end
end
end
Expand Down

0 comments on commit 24b27e4

Please sign in to comment.