mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-26 05:55:15 +00:00
Allow select_distribution to take no order_cycle
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
module OpenFoodNetwork
|
||||
module DistributionHelper
|
||||
|
||||
def select_distribution(distributor, order_cycle)
|
||||
def select_distribution(distributor, order_cycle=nil)
|
||||
create_enterprise_group_for distributor
|
||||
visit root_path
|
||||
click_link distributor.name
|
||||
|
||||
if page.has_select? 'order_order_cycle_id'
|
||||
if order_cycle && page.has_select?('order_order_cycle_id')
|
||||
select_by_value order_cycle.id, from: 'order_order_cycle_id'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user