mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Improve query in filter_schedules_by_enterprise_id. Makes join to OCs explicity.
This commit is contained in:
@@ -40,7 +40,7 @@ module Admin
|
||||
|
||||
# Filter schedules by OCs with a given coordinator id
|
||||
def filter_schedules_by_enterprise_id(schedules, enterprise_id)
|
||||
schedules.where("order_cycles.coordinator_id = ?", enterprise_id.to_i)
|
||||
schedules.joins(:order_cycles).where(order_cycles: { coordinator_id: enterprise_id.to_i })
|
||||
end
|
||||
|
||||
def collection_actions
|
||||
|
||||
Reference in New Issue
Block a user