diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index 4649b5a0e6..fd55aa4777 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -766,13 +766,6 @@ module Spree address end - # Update attributes of a record in the database without callbacks, validations etc. - # This was originally an extension to ActiveRecord in Spree but only used for Spree::Order - def update_attributes_without_callbacks(attributes) - assign_attributes(attributes) - Spree::Order.where(id: id).update_all(attributes) - end - private def process_each_payment diff --git a/engines/order_management/app/services/order_management/order/updater.rb b/engines/order_management/app/services/order_management/order/updater.rb index e7cb051a4f..6ff7ef5ef6 100644 --- a/engines/order_management/app/services/order_management/order/updater.rb +++ b/engines/order_management/app/services/order_management/order/updater.rb @@ -32,7 +32,7 @@ module OrderManagement # update totals a second time in case updated adjustments have an effect on the total update_totals - order.update_attributes_without_callbacks( + order.update_columns( payment_state: order.payment_state, shipment_state: order.shipment_state, item_total: order.item_total,