app/jobs/graduation_job.rb
# Deactivate an embargo, leaving the prior embargo information in the embargo_history
Deactivate an embargo, leaving the prior embargo information in the embargo_history
Deactivate an embargo leaving the prior embargo information in the embargo_history
def deactivate_embargo
    @work.visibility = @work.visibility_after_embargo if @work.visibility_after_embargo
    @work.deactivate_embargo!
    @work.embargo.save
    @work.save
    @work.file_sets.each do |fs|
      fs.visibility = @work.visibility
      fs.deactivate_embargo!
      fs.save
    end
    Rails.logger.warn "ETD #{@work.id} post-dated embargo deactivated"
  end
def deactivate_embargo @work . visibility = @work . visibility_after_embargo if @work . visibility_after_embargo @work . deactivate_embargo! @work . embargo . save @work . save @work . file_sets . each do | fs | fs . visibility = @work . visibility fs . deactivate_embargo! fs . save end Rails . logger . warn "ETD #{@work.id} post-dated embargo deactivated" end
Deactivate an embargo, leaving the prior embargo information in the embargo_history
Deactivate an embargo leaving the prior embargo information in the embargo_history