mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove #update_attributes_without_callbacks
This is a hacky Spree method that's removed in Spree 2.2
See: 7deba6a152
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user