diff --git a/core/lib/spree/core/state_machines/order.rb b/core/lib/spree/core/state_machines/order.rb index db1faf5e3c5..058419d333f 100644 --- a/core/lib/spree/core/state_machines/order.rb +++ b/core/lib/spree/core/state_machines/order.rb @@ -46,7 +46,11 @@ def define_state_machine! # Persist the state on the order after_transition do |order, transition| - order.state = order.state + # Hard to say if this is really necessary, it was introduced in this commit: + # https://github.com/mamhoff/solidus/commit/fa1d66c42e4c04ee7cd1c20d87e4cdb74a226d3d + # But it seems to be harmless, so we'll keep it for now. + order.state = order.state # rubocop:disable Lint/SelfAssignment + order.state_changes.create( previous_state: transition.from, next_state: transition.to,