From 000e2c07f8c5ebff720d521630afd4eb3c4a9335 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Tue, 11 May 2021 12:17:06 +0100 Subject: [PATCH] Use OrderContents in OrdersController --- app/controllers/spree/orders_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/spree/orders_controller.rb b/app/controllers/spree/orders_controller.rb index 4343ff87cb..c380d016c5 100644 --- a/app/controllers/spree/orders_controller.rb +++ b/app/controllers/spree/orders_controller.rb @@ -66,10 +66,7 @@ module Spree # This action is called either from the cart page when the order is not yet complete, or from # the edit order page (frontoffice) if the hub allows users to update completed orders. - # This line item updating logic should probably be handled through CartService#populate. - if @order.update(order_params) - discard_empty_line_items - + if @order.contents.update_cart(order_params) @order.recreate_all_fees! # Enterprise fees on line items and on the order itself if @order.complete?