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.3] Fix error added when resetting order flow on an empty order #5333

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.3:

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 #5333 (0cc85cf) into v3.3 (2049264) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             v3.3    #5333   +/-   ##
=======================================
  Coverage   86.69%   86.69%           
=======================================
  Files         577      577           
  Lines       14669    14669           
=======================================
  Hits        12718    12718           
  Misses       1951     1951           
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.3] Merge pull request #5330 from nebulab/waiting-for-dev/fix_errors_on_restart_flow [v3.3] Fix error added when resetting order flow on an empty order Aug 14, 2023
@waiting-for-dev waiting-for-dev merged commit 508b13f into v3.3 Aug 14, 2023
4 checks passed
@waiting-for-dev waiting-for-dev deleted the backport/v3.3/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