Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3.4] Fix error added when resetting order flow on an empty order #5334

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

github-actions[bot]
Copy link

Backport

This will backport the following commits from main to v3.4:

Questions ?

Please refer to the Backport tool documentation

#4369 introduced a regression
where when calling `Spree::Order#restart_checkout_flow` on an empty
order, an error would be added to the order. That happened when calling
`#next` and the validation failed because no line items were present.

We restore the previous behavior where we only try going to the
`"address"` state if the order has line items.

(cherry picked from commit 82c7bdf)
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #5334 (710e3f9) into v3.4 (9830d55) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             v3.4    #5334   +/-   ##
=======================================
  Coverage   86.64%   86.64%           
=======================================
  Files         580      580           
  Lines       14741    14741           
=======================================
  Hits        12772    12772           
  Misses       1969     1969           
Files Changed Coverage Δ
core/app/models/spree/order.rb 94.22% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@waiting-for-dev waiting-for-dev added the changelog:solidus_core Changes to the solidus_core gem label Aug 14, 2023
@waiting-for-dev waiting-for-dev changed the title [v3.4] Merge pull request #5330 from nebulab/waiting-for-dev/fix_errors_on_restart_flow [v3.4] Fix error added when resetting order flow on an empty order Aug 14, 2023
@waiting-for-dev waiting-for-dev merged commit 3a18bf6 into v3.4 Aug 14, 2023
4 checks passed
@waiting-for-dev waiting-for-dev deleted the backport/v3.4/pr-5330 branch August 14, 2023 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant