mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Refactor #product_properties not to fetch ids
This commit is contained in:
@@ -75,7 +75,9 @@ class Api::CachedEnterpriseSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def product_properties
|
||||
Spree::Property.applied_by(object)
|
||||
Spree::Property
|
||||
.joins(product_properties: { product: :supplier })
|
||||
.where(spree_products: { supplier_id: enterprise })
|
||||
end
|
||||
|
||||
def producer_properties
|
||||
|
||||
Reference in New Issue
Block a user