Merge pull request #6729 from tchak/revert-fix

This commit is contained in:
Pierre de La Morinerie 2021-12-07 15:09:36 +01:00 committed by GitHub
commit f1c267fe81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -560,11 +560,12 @@ class Dossier < ApplicationRecord
approximative_expiration_date_reference,
conservation_extension,
procedure.duree_conservation_dossiers_dans_ds.months
].compact.sum - REMAINING_WEEKS_BEFORE_EXPIRATION.weeks
].sum - REMAINING_WEEKS_BEFORE_EXPIRATION.weeks
end
def close_to_expiration?
return false
return false if en_instruction?
approximative_expiration_date < Time.zone.now
end
def expiration_date

View file

@ -7,7 +7,7 @@ namespace :after_party do
progress = ProgressReport.new(dossiers.count)
dossiers.find_each do |dossier|
if dossier.processed_at != dossier.traitement.processed_at
if dossier.read_attribute(:processed_at) != dossier.traitement.processed_at
dossier.update_column(:processed_at, dossier.traitement.processed_at)
end
progress.inc