Skip to content

Commit

Permalink
Disable Rubocop self assign check in order state machine
Browse files Browse the repository at this point in the history
Cherry Picked from bc3944d

Co-Authored-By: Elia Schito <[email protected]>
  • Loading branch information
tvdeyen and elia committed Feb 8, 2024
1 parent a0a2cb5 commit 858a2cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/lib/spree/core/state_machines/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 858a2cf

Please sign in to comment.