mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
(quality) add eager loading for orders
This commit is contained in:
parent
eb50c37419
commit
a8b9ebb665
@ -6,7 +6,7 @@ class Orders::OrderService
|
||||
ORDERS_PER_PAGE = 20
|
||||
|
||||
def list(filters, current_user)
|
||||
orders = Order.where(nil)
|
||||
orders = Order.includes([:statistic_profile]).where(nil)
|
||||
orders = filter_by_user(orders, filters, current_user)
|
||||
orders = filter_by_reference(orders, filters, current_user)
|
||||
orders = filter_by_state(orders, filters)
|
||||
|
Loading…
x
Reference in New Issue
Block a user