mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use distinct to return unique product
- Product were displayed twice (or more) in certain condition under order cycle incoming products admin interface
This commit is contained in:
@@ -159,7 +159,8 @@ module Spree
|
||||
joins('
|
||||
LEFT OUTER JOIN inventory_items AS o_inventory_items
|
||||
ON (o_spree_variants.id = o_inventory_items.variant_id)').
|
||||
where('o_inventory_items.enterprise_id = (?) AND visible = (?)', enterprise, true)
|
||||
where('o_inventory_items.enterprise_id = (?) AND visible = (?)', enterprise, true).
|
||||
distinct
|
||||
}
|
||||
|
||||
# -- Scopes
|
||||
|
||||
Reference in New Issue
Block a user