From 9316096d4d08b9ef9cddb72d3de0e79a4b35ed23 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Tue, 26 Feb 2019 17:58:21 +0800 Subject: [PATCH] Fix updating of the shipping method for an order --- app/services/order_syncer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/services/order_syncer.rb b/app/services/order_syncer.rb index 663073fadd..2aea46686b 100644 --- a/app/services/order_syncer.rb +++ b/app/services/order_syncer.rb @@ -69,8 +69,7 @@ class OrderSyncer shipment = order.shipment if shipment.andand.state == "pending" && shipment.shipping_method.id == shipping_method_id_was - shipment.update_attributes(shipping_method_id: shipping_method_id) - order.update_attribute(:shipping_method_id, shipping_method_id) + order.select_shipping_method(shipping_method_id) else unless shipment.andand.state == "pending" && shipment.shipping_method.id == shipping_method_id order_update_issues.add(order, I18n.t('admin.shipping_method'))