mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-11 23:17:48 +00:00
Simplify, simplify
This commit is contained in:
@@ -46,7 +46,7 @@ module OpenFoodNetwork
|
||||
|
||||
# Find the exchanges of an order cycle that an admin can manage
|
||||
def order_cycle_exchanges(order_cycle)
|
||||
enterprises = managed_enterprises + related_enterprises_with(:add_to_order_cycle)
|
||||
enterprises = managed_and_related_enterprises_with :add_to_order_cycle
|
||||
order_cycle.exchanges.to_enterprises(enterprises).from_enterprises(enterprises)
|
||||
end
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ module Spree
|
||||
|
||||
context "when is a distributor enterprise user" do
|
||||
# create distributor_enterprise1 user without full admin access
|
||||
let (:user) do
|
||||
let(:user) do
|
||||
user = create(:user)
|
||||
user.spree_roles = []
|
||||
d1.enterprise_roles.build(user: user).save
|
||||
|
||||
Reference in New Issue
Block a user