[#10951] Create a cron job to warn user that old brouillon is deleted

This commit is contained in:
Mathieu Magnin 2024-11-19 16:55:23 +01:00
parent 38e9ca4979
commit 5ab0899a49
No known key found for this signature in database
GPG key ID: 8DCAFC82D7BA654E
6 changed files with 84 additions and 1 deletions

View file

@ -567,7 +567,7 @@ class Dossier < ApplicationRecord
end
def can_be_deleted_by_automatic?(reason)
reason == :expired && !en_instruction?
reason == :expired && !en_instruction? || reason == :not_modified_for_a_long_time && brouillon?
end
def can_terminer_automatiquement_by_sva_svr?