fixed codeclimate errors

This commit is contained in:
dinsmol 2021-09-09 14:05:29 +03:00
parent e7e3278267
commit e0c47cdb35
9 changed files with 13 additions and 18 deletions

View file

@ -63,9 +63,7 @@ class Registrar
possible_users = ApiUser.where(identity_code: idc) || User.new
possible_users.each do |selected_user|
if selected_user.registrar.white_ips.registrar_area.include_ip?(request.ip)
return selected_user
end
return selected_user if selected_user.registrar.white_ips.registrar_area.include_ip?(request.ip)
end
end

View file

@ -22,7 +22,7 @@ class Registrar
def load_xml
cl_trid = "#{depp_current_user.tag}-#{Time.zone.now.to_i}"
xml_dir_path = Rails.root.join('app', 'views', 'registrar', 'xml_consoles', 'epp_requests').to_s
xml_dir_path = Rails.root.join('app/views/registrar/xml_consoles/epp_requests').to_s
xml = File.read("#{xml_dir_path}/#{params[:obj]}/#{params[:epp_action]}.xml")
xml = prepare_payload(xml, cl_trid)