mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix server-side import_date filtering
This commit is contained in:
@@ -103,6 +103,11 @@ module Api
|
||||
scope.includes(:master)
|
||||
end
|
||||
|
||||
def import_date_scope
|
||||
return if params[:import_date].blank?
|
||||
Spree::Variant.where(import_date: params[:import_date])
|
||||
end
|
||||
|
||||
def paged_products_for_producers(producers)
|
||||
Spree::Product.scoped.
|
||||
merge(product_scope).
|
||||
|
||||
Reference in New Issue
Block a user