fix(dossier): destroy operation logs when destroying an expired dossier

This commit is contained in:
Paul Chavard 2021-11-04 19:04:04 +01:00
parent 3f52ecbd0f
commit faa235d205

View file

@ -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!