diff --git a/app/models/doi.rb b/app/models/doi.rb index 8fe85fd74..f79958bca 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -1840,7 +1840,7 @@ def event=(value) end def check_url - unless url.blank? || match_url_with_domains(url: url, domains: client.domains) + unless url.blank? || client.blank? || match_url_with_domains(url: url, domains: client.domains) errors.add(:url, "URL is not allowed by repository domain settings.") end end