Fix old tasks

This commit is contained in:
Paul Chavard 2020-02-13 10:00:52 +01:00
parent 1ce1c1e6d0
commit 1cd913913a
3 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ namespace :after_party do
task create_dummy_paths_for_archived_and_hidden_procedures: :environment do
rake_puts "Running deploy task 'create_dummy_paths_for_archived_procedures'"
Procedure.with_hidden.archivees.where(path: nil).each do |p|
Procedure.with_discarded.archivees.where(path: nil).each do |p|
p.update_column(:path, SecureRandom.uuid)
end

View file

@ -2,7 +2,7 @@ namespace :after_party do
desc 'Deployment task: create_default_groupe_instructeur'
task create_default_groupe_instructeur: :environment do
Procedure
.with_hidden
.with_discarded
.left_outer_joins(:groupe_instructeurs)
.where('groupe_instructeurs.id is null')
.find_each do |procedure|