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

[v4.1] Fix error added when resetting order flow on an empty order #5336

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 v4.1:

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 #5336 (46dd840) into v4.1 (b13e221) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             v4.1    #5336   +/-   ##
=======================================
  Coverage   88.67%   88.67%           
=======================================
  Files         564      564           
  Lines       13893    13893           
=======================================
  Hits        12319    12319           
  Misses       1574     1574           
Files Changed Coverage Δ
core/app/models/spree/order.rb 94.65% <100.00%> (ø)

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

@waiting-for-dev waiting-for-dev changed the title [v4.1] Merge pull request #5330 from nebulab/waiting-for-dev/fix_errors_on_restart_flow [v4.1] Fix error added when resetting order flow on an empty order Aug 14, 2023
@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 merged commit 5fea40b into v4.1 Aug 14, 2023
4 checks passed
@waiting-for-dev waiting-for-dev deleted the backport/v4.1/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