mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
(bug) wrong namespace for task fix:cart_operator
This commit is contained in:
parent
fbe59a3aac
commit
65a7c5c73b
@ -3,6 +3,8 @@
|
|||||||
- Improved upgrade script
|
- Improved upgrade script
|
||||||
- Fix a bug: empty advanced accounting code is not defaulted to the general setting
|
- Fix a bug: empty advanced accounting code is not defaulted to the general setting
|
||||||
- Fix a bug: invalid style in accounting codes settings
|
- Fix a bug: invalid style in accounting codes settings
|
||||||
|
- Fix a bug: wrong namespace for task cart_operator
|
||||||
|
- [TODO DEPLOY] `rails fablab:fix:cart_operator`
|
||||||
- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines`
|
- [TODO DEPLOY] `rails fablab:setup:build_accounting_lines`
|
||||||
|
|
||||||
## v5.8.1 2023 March 03
|
## v5.8.1 2023 March 03
|
||||||
|
@ -294,15 +294,15 @@ namespace :fablab do
|
|||||||
Fablab::Application.load_tasks if Rake::Task.tasks.empty?
|
Fablab::Application.load_tasks if Rake::Task.tasks.empty?
|
||||||
Rake::Task['fablab:chain:invoices_items'].invoke
|
Rake::Task['fablab:chain:invoices_items'].invoke
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
desc '[release 5.7] fix operator of self-bought carts'
|
desc '[release 5.6] fix operator of self-bought carts'
|
||||||
task cart_operator: :environment do |_task, _args|
|
task cart_operator: :environment do |_task, _args|
|
||||||
Order.where.not(statistic_profile_id: nil).find_each do |order|
|
Order.where.not(statistic_profile_id: nil).find_each do |order|
|
||||||
order.update(operator_profile_id: order.user&.invoicing_profile&.id)
|
order.update(operator_profile_id: order.user&.invoicing_profile&.id)
|
||||||
end
|
end
|
||||||
Order.where.not(operator_profile_id: nil).find_each do |order|
|
Order.where.not(operator_profile_id: nil).find_each do |order|
|
||||||
order.update(statistic_profile_id: order.operator_profile&.user&.statistic_profile&.id)
|
order.update(statistic_profile_id: order.operator_profile&.user&.statistic_profile&.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user