mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
(fix) api/products/index bug when sorting by amount
This commit is contained in:
parent
2b9cb8ca96
commit
910bdcb080
@ -8,6 +8,7 @@
|
||||
- improvement: add including_deleted_users param for open api users
|
||||
- decreases sidekiq concurrency from 25 to 5, 25 is too much and consumes memory for nothing
|
||||
- do not log Notifications#polling action anymore, by default, can be enable via env variable ENABLE_NOTIFICATIONS_POLLING_LOGGING=true
|
||||
- Fix a bug: api/products/index bug when sorting by amount
|
||||
|
||||
## v6.2.0 2023 October 13
|
||||
|
||||
|
@ -173,7 +173,7 @@ class ProductService
|
||||
order ||= 'desc'
|
||||
|
||||
if key == 'amount'
|
||||
products.order("COALESCE(amount, 0) #{order.upcase}")
|
||||
products.order(Arel.sql("COALESCE(amount, 0) #{order.upcase}"))
|
||||
else
|
||||
products.order(key => order)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user