diff --git a/app/controllers/registrant/domains_controller.rb b/app/controllers/registrant/domains_controller.rb index 6580b1c..116ece8 100644 --- a/app/controllers/registrant/domains_controller.rb +++ b/app/controllers/registrant/domains_controller.rb @@ -18,6 +18,8 @@ def new end Tld::Estonian::MIN_NAMESERVER_COUNT.times do |i| + next if Setting.default_nameserver_records[i].blank? + current_nameserver = JSON.parse(Setting.default_nameserver_records[i]) @domain.nameservers.build( hostname: current_nameserver['hostname'], diff --git a/app/views/registrant/domains/_form.html.erb b/app/views/registrant/domains/_form.html.erb index 9bd9a16..ba1827f 100644 --- a/app/views/registrant/domains/_form.html.erb +++ b/app/views/registrant/domains/_form.html.erb @@ -9,9 +9,15 @@