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