[fix #2696] Rake: add task to fill empty instruction_at
This commit is contained in:
parent
4d4dba1550
commit
29e40fa061
1 changed files with 9 additions and 0 deletions
9
lib/tasks/2018_09_27_fill_missing_en_instruction_at.rake
Normal file
9
lib/tasks/2018_09_27_fill_missing_en_instruction_at.rake
Normal file
|
@ -0,0 +1,9 @@
|
|||
namespace :'2018_09_27_fill_missing_en_instruction_at' do
|
||||
task run: :environment do
|
||||
dossiers_with_missing_instruction_at = Dossier
|
||||
.where.not(processed_at: nil)
|
||||
.where(en_instruction_at: nil)
|
||||
|
||||
dossiers_with_missing_instruction_at.each { |d| d.update(en_instruction_at: d.processed_at) }
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue