get_errors? fixed
This commit is contained in:
parent
ad83a34437
commit
a7c2096423
@ -259,7 +259,7 @@ class DNSManager::Storage::Zone
|
||||
io << "TEST"
|
||||
end
|
||||
|
||||
def get_errors? : Array(Error)
|
||||
def get_errors? : Array(Error)?
|
||||
errors = [] of Error
|
||||
unless Zone.is_domain_valid? @domain
|
||||
errors << "invalid domain #{@domain}"
|
||||
@ -280,8 +280,12 @@ class DNSManager::Storage::Zone
|
||||
errors << "invalid zone: no NS record"
|
||||
end
|
||||
|
||||
if errors.empty?
|
||||
nil
|
||||
else
|
||||
errors
|
||||
end
|
||||
end
|
||||
|
||||
# This regex only is "good enough for now".
|
||||
def self.is_domain_valid?(domain) : Bool
|
||||
|
Loading…
Reference in New Issue
Block a user