Merge pull request #5435 from betagouv/fix-5288-commentaires
last_commentaire_updated_at does not take system email into account
This commit is contained in:
commit
efca6745d6
1 changed files with 4 additions and 1 deletions
|
@ -7,7 +7,10 @@ class TmpSetDossiersLastUpdatedAtJob < ApplicationJob
|
|||
.limit(100)
|
||||
|
||||
dossiers.find_each do |dossier|
|
||||
last_commentaire_updated_at = dossier.commentaires.maximum(:updated_at)
|
||||
last_commentaire_updated_at = dossier.commentaires
|
||||
.where.not(email: OLD_CONTACT_EMAIL)
|
||||
.where.not(email: CONTACT_EMAIL)
|
||||
.maximum(:updated_at)
|
||||
last_avis_updated_at = dossier.avis.maximum(:updated_at)
|
||||
last_champ_updated_at = dossier.champs.maximum(:updated_at)
|
||||
last_champ_private_updated_at = dossier.champs_private.maximum(:updated_at)
|
||||
|
|
Loading…
Reference in a new issue