Only require OrderCycleShippingMethod records if people want to override the default shipping methods

It makes things much simpler if we return all shipping methods by default without needing OrderCycleShippingMethod records to be added to the database.

Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
Cillian O'Ruanaidh
2022-06-17 10:48:36 +01:00
committed by Filipe
parent 4e0bf75ecf
commit fc4f951a1a
16 changed files with 243 additions and 369 deletions

View File

@@ -57,9 +57,6 @@ module SampleData
log "- #{name}"
cycle = create_order_cycle_with_fee(name, coordinator)
create_exchanges(cycle, supplier_names, distributor_names, data)
return if cycle.reload.attachable_shipping_methods.none?
cycle.shipping_method_ids = cycle.attachable_shipping_methods.pluck(:id)
end
def create_order_cycle_with_fee(name, coordinator)