diff --git a/app/models/doi.rb b/app/models/doi.rb index bc4dd3f46..356dacada 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -430,7 +430,7 @@ def timestamp # update state for all DOIs in state "undetermined" starting from from_date def self.set_state(from_date: nil) from_date ||= Time.zone.now - 1.day - Doi.where("updated >= ?", from_date).where(aasm_state: 'undetermined').find_each do |doi| + Doi.where("updated >= ?", from_date).where(aasm_state: '').find_each do |doi| if doi.is_test_prefix? || (doi.is_active == "\x00" && doi.minted.blank?) state = "draft" elsif doi.is_active == "\x00" && doi.minted.present?