pj migration: print a notice when migrating missing files

This commit is contained in:
Pierre de La Morinerie 2019-05-29 12:03:16 +02:00
parent a168ae3a72
commit 1a256b37f8

View file

@ -1,3 +1,5 @@
require Rails.root.join("lib", "tasks", "task_helper")
class PieceJustificativeToChampPieceJointeMigrationService
def initialize(**params)
params.each do |key, value|
@ -86,6 +88,7 @@ class PieceJustificativeToChampPieceJointeMigrationService
else
make_empty_blob(pj)
rake_puts "Notice: attached file for champ #{champ.id} not found. An empty blob has been attached instead."
end
# By reloading, we force ActiveStorage to look at the attachment again, and see