[fix #2696] Rake: add task to fill empty instruction_at

This commit is contained in:
simon lehericey 2018-09-27 15:01:18 +02:00
parent 4d4dba1550
commit 29e40fa061

View 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