Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix flaky product sorting test (#13587)

Damian Legawiec9e98ba371603
diff --git a/backend/engines/admin/app/controllers/spree/admin/products_controller.rb b/backend/engines/admin/app/controllers/spree/admin/products_controller.rb
index 204c9eb518..36097d5f8b 100644
--- a/backend/engines/admin/app/controllers/spree/admin/products_controller.rb
+++ b/backend/engines/admin/app/controllers/spree/admin/products_controller.rb
@@ -209,6 +209,10 @@ module Spree
end
# These includes are not picked automatically by ar_lazy_preload gem so we need to specify them manually.
+ def collection_default_sort
+ 'name asc'
+ end
+
def collection_includes
{
thumbnail: [attachment_attachment: :blob],