mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
added condition to return if there no any domain_name header
This commit is contained in:
parent
6f08360d41
commit
459f626808
2 changed files with 28 additions and 1 deletions
|
@ -7,6 +7,7 @@ class Registrar
|
|||
ipv6 = params[:ipv6].split("\r\n")
|
||||
|
||||
domains = domain_list_from_csv
|
||||
|
||||
return csv_list_empty_guard if domains == []
|
||||
|
||||
uri = URI.parse("#{ENV['repp_url']}registrar/nameservers")
|
||||
|
@ -53,7 +54,11 @@ class Registrar
|
|||
return if params[:puny_file].blank?
|
||||
|
||||
domains = []
|
||||
CSV.read(params[:puny_file].path, headers: true).map { |b| domains << b['domain_name'] }
|
||||
csv = CSV.read(params[:puny_file].path, headers: true)
|
||||
|
||||
return if csv['domain_name'].blank?
|
||||
csv.map { |b| domains << b['domain_name'] }
|
||||
|
||||
domains.compact
|
||||
rescue CSV::MalformedCSVError
|
||||
[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue