From faa235d2052a563430adbe81ea182809af1c5a55 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 4 Nov 2021 19:04:04 +0100 Subject: [PATCH] fix(dossier): destroy operation logs when destroying an expired dossier --- app/models/dossier.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index cc278f844..ee6b96daf 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -649,6 +649,7 @@ class Dossier < ApplicationRecord transaction do if keep_track_on_deletion? DeletedDossier.create_from_dossier(self, :expired) + dossier_operation_logs.destroy_all log_automatic_dossier_operation(:supprimer, self) end destroy!