get_errors? fixed
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,7 +280,11 @@ class DNSManager::Storage::Zone
|
|||
errors << "invalid zone: no NS record"
|
||||
end
|
||||
|
||||
errors
|
||||
if errors.empty?
|
||||
nil
|
||||
else
|
||||
errors
|
||||
end
|
||||
end
|
||||
|
||||
# This regex only is "good enough for now".
|
||||
|
|
Loading…
Reference in New Issue