Skip to content

Commit

Permalink
also fetch handle url for draft dois if minted
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Oct 27, 2018
1 parent 134cad6 commit 9051688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9051688

Please sign in to comment.