mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove duplicate method
The method `CheckoutCallbacks#valid_order_line_items?` was a duplicate of `OrderStockCheck#valid_order_line_items?`. Apparently, it had been extracted twice: *1d074c2151*06eb98bdf4But the first commit duplicated the method while the second moved the original declaration.
This commit is contained in:
@@ -63,12 +63,6 @@ module CheckoutCallbacks
|
||||
end
|
||||
end
|
||||
|
||||
def valid_order_line_items?
|
||||
@order.insufficient_stock_lines.empty? &&
|
||||
OrderCycles::DistributedVariantsService.new(@order.order_cycle, @order.distributor).
|
||||
distributes_order_variants?(@order)
|
||||
end
|
||||
|
||||
def ensure_order_not_completed
|
||||
redirect_to main_app.cart_path if @order.completed?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user