Skip to content

Commit

Permalink
Fix Rubocop Style/SafeNavigation
Browse files Browse the repository at this point in the history
  • Loading branch information
archanaserver committed Aug 10, 2023
1 parent 7406bbf commit 5ef888b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dhcp/dhcp_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Proxy::DhcpApi < ::Sinatra::Base
delete "/:network/mac/:mac_address" do
server.validate_supported_address(params[:network])
validate_mac(params[:mac_address])
server.del_record_by_mac(params[:network], params[:mac_address].nil? ? nil : params[:mac_address].downcase)
server.del_record_by_mac(params[:network], params[:mac_address]&.downcase)
nil
rescue ::Proxy::DHCP::SubnetNotFound
# no need to do anything
Expand Down

0 comments on commit 5ef888b

Please sign in to comment.