Use new state API instead of locked

be554fde9f
This commit is contained in:
Enrico Stano
2017-05-18 16:05:22 +02:00
committed by Rob Harrington
parent 6816061915
commit 72292b1dd3

View File

@@ -344,10 +344,10 @@ Spree::Order.class_eval do
end
def update_adjustment!(adjustment)
locked = adjustment.locked
adjustment.locked = false
state = adjustment.state
adjustment.state = 'open'
adjustment.update!(self)
adjustment.locked = locked
adjustment.state = state
end
# object_params sets the payment amount to the order total, but it does this before