From 360fa00c6e548a50ae22f545d70a5abb8bd3135c Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 27 Oct 2018 18:46:13 +0200 Subject: [PATCH] only try to set url from handle system if minted --- 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 1381bdd6a..dff832d12 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -472,7 +472,7 @@ def self.register_all_urls(limit: nil) def self.set_url(from_date: nil) from_date = from_date.present? ? Date.parse(from_date) : Date.current - 1.day - Doi.where(url: nil).where(aasm_state: ["registered", "findable"]).where("updated >= ?", from_date).find_each do |doi| + Doi.where(url: nil).where.not(minted: nil).where(aasm_state: ["registered", "findable"]).where("updated >= ?", from_date).find_each do |doi| UrlJob.perform_later(doi) end