From 90516885eba6b5b401b9dd7f99f2b51d89d49c3c Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 27 Oct 2018 18:51:57 +0200 Subject: [PATCH] also fetch handle url for draft dois 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 dff832d12..f884a1935 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.not(minted: nil).where(aasm_state: ["registered", "findable"]).where("updated >= ?", from_date).find_each do |doi| + Doi.where(url: nil).where.not(minted: nil).where("updated >= ?", from_date).find_each do |doi| UrlJob.perform_later(doi) end