mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Merge pull request #36 from internetee/story/109965360-nameservers-validation
Story#109965360 - do not validate destroyed domain nameservers
This commit is contained in:
commit
fcc8bd6f54
1 changed files with 1 additions and 1 deletions
|
@ -543,7 +543,7 @@ class Domain < ActiveRecord::Base
|
||||||
### VALIDATIONS ###
|
### VALIDATIONS ###
|
||||||
|
|
||||||
def validate_nameserver_ips
|
def validate_nameserver_ips
|
||||||
nameservers.each do |ns|
|
nameservers.to_a.reject(&:marked_for_destruction?).each do |ns|
|
||||||
next unless ns.hostname.end_with?(name)
|
next unless ns.hostname.end_with?(name)
|
||||||
next if ns.ipv4.present?
|
next if ns.ipv4.present?
|
||||||
errors.add(:nameservers, :invalid) if errors[:nameservers].blank?
|
errors.add(:nameservers, :invalid) if errors[:nameservers].blank?
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue