mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-13 04:00:21 +00:00
Find all producers for which we can create variant overrides
This commit is contained in:
@@ -20,6 +20,11 @@ module OpenFoodNetwork
|
||||
managed_and_related_enterprises_with :edit_profile
|
||||
end
|
||||
|
||||
def variant_override_producers
|
||||
producer_ids = variant_override_enterprises_per_hub.values.flatten.uniq
|
||||
Enterprise.where(id: producer_ids)
|
||||
end
|
||||
|
||||
# For every hub that an admin manages, show all the producers for which that hub may
|
||||
# override variants
|
||||
# {hub1_id => [producer1_id, producer2_id, ...], ...}
|
||||
|
||||
Reference in New Issue
Block a user