fix(dossier): destroy operation logs when destroying an expired dossier
This commit is contained in:
parent
3f52ecbd0f
commit
faa235d205
1 changed files with 1 additions and 0 deletions
|
@ -649,6 +649,7 @@ class Dossier < ApplicationRecord
|
||||||
transaction do
|
transaction do
|
||||||
if keep_track_on_deletion?
|
if keep_track_on_deletion?
|
||||||
DeletedDossier.create_from_dossier(self, :expired)
|
DeletedDossier.create_from_dossier(self, :expired)
|
||||||
|
dossier_operation_logs.destroy_all
|
||||||
log_automatic_dossier_operation(:supprimer, self)
|
log_automatic_dossier_operation(:supprimer, self)
|
||||||
end
|
end
|
||||||
destroy!
|
destroy!
|
||||||
|
|
Loading…
Reference in a new issue