fix(dossier): fix again hidden_by_reason nil to fix Cron::DiscardedDossiersDeletionJob
This commit is contained in:
parent
e9585632d9
commit
08666cd852
1 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
||||||
|
namespace :after_party do
|
||||||
|
desc 'Deployment task: fix_again_hidden_by_reason_nil'
|
||||||
|
task fix_again_hidden_by_reason_nil: :environment do
|
||||||
|
puts "Running deploy task 'fix_again_hidden_by_reason_nil'"
|
||||||
|
|
||||||
|
Dossier.en_construction_expired_to_delete.where(hidden_by_reason: nil).update_all(hidden_by_reason: :user_request)
|
||||||
|
Dossier.termine_expired_to_delete.where(hidden_by_reason: nil).update_all(hidden_by_reason: :user_request)
|
||||||
|
|
||||||
|
# Update task as completed. If you remove the line below, the task will
|
||||||
|
# run with every deploy (or every time you call after_party:run).
|
||||||
|
AfterParty::TaskRecord
|
||||||
|
.create version: AfterParty::TaskRecorder.new(__FILE__).timestamp
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue