[#2180] Task to migrate PJs to champs PJ for one procedure

This commit is contained in:
Frederic Merizen 2019-03-26 21:41:54 +01:00
parent 7d316b8369
commit 498fe3b6ef

View file

@ -0,0 +1,8 @@
namespace :'2019_03_13_migrate_pjs_to_champs' do
task run: :environment do
procedure_id = ENV['PROCEDURE_ID']
service = PieceJustificativeToChampPieceJointeMigrationService.new
service.ensure_correct_storage_configuration!
service.convert_procedure_pjs_to_champ_pjs(Procedure.find(procedure_id))
end
end