solidusio / solidus

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.
https://solidus.io
Other
4.99k stars 1.29k forks source link

Spree::Variant.in_stock: Only show distinct variants #5860

Closed mamhoff closed 1 day ago

mamhoff commented 1 week ago

Summary

Without the .distinct added to this scope, it returns the same variant multiple times if there is stock in multiple stock locations.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.23%. Comparing base (8182cb2) to head (b2f8e4f). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5860 +/- ## ======================================= Coverage 89.23% 89.23% ======================================= Files 752 752 Lines 17510 17510 ======================================= Hits 15625 15625 Misses 1885 1885 ``` | [Flag](https://app.codecov.io/gh/solidusio/solidus/pull/5860/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=solidusio) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/solidusio/solidus/pull/5860/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=solidusio) | `89.23% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=solidusio#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.