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.2] Fix search by variant on stock items #5662

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove order by sku from variant scope
This "fixes" the variant scope issue but I'm not sure it's the solution
we want. I suppose it depends if ordering by sku is important here.

Co-authored-by: An Stewart <[email protected]>
(cherry picked from commit c4bd75a)
  • Loading branch information
nvandoorn committed Feb 14, 2024
commit 0bef762cc746aff6c02fd7c5edf28b15265ca968
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def load_stock_management_data
def variant_scope
scope = Spree::Variant
.accessible_by(current_ability)
.distinct.order(:sku)
.distinct
.includes(
:images,
stock_items: :stock_location,
Expand Down
Loading