Merge pull request #9758 from demarches-simplifiees/purge_supprimer_dol

Tech: quand un dossier est définitivement supprimé, on ne garde que le log (DOL) concernant sa suppression
This commit is contained in:
LeSim 2024-08-20 09:26:33 +00:00 committed by GitHub
commit befe74b801
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 1 deletions

View file

@ -41,7 +41,9 @@ class DossierOperationLog < ApplicationRecord
def self.purge_discarded
not_deletion.destroy_all
with_data.each(&:move_to_cold_storage!)
supprimer.map { _1.serialized.purge_later }
supprimer.update_all(data: nil)
end
def self.create_and_serialize(params)