From d79f3838180be8744958cb3b3c2ca69460fe9ee2 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 24 Oct 2020 14:28:59 +0200 Subject: [PATCH] handle dois without client, e.g. from crossref --- app/models/doi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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