Merge pull request #6729 from tchak/revert-fix
This commit is contained in:
commit
f1c267fe81
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue