Use application logger in set_original_heading_id
The pull request adding the original heading was done before we started using `ApplicationLogger` in rake tasks.
This commit is contained in:
@@ -15,14 +15,13 @@ namespace :budgets do
|
||||
|
||||
desc "Update investments original_heading_id with current heading_id"
|
||||
task set_original_heading_id: :environment do
|
||||
puts "Starting"
|
||||
ApplicationLogger.new.info "Setting original_heading_id to investments"
|
||||
Budget::Investment.find_each do |investment|
|
||||
unless investment.original_heading_id.present?
|
||||
investment.update_column(:original_heading_id, investment.heading_id)
|
||||
end
|
||||
print "."
|
||||
end
|
||||
puts "Finished"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user