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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Fixed price filter and flaky test
Damian Legawiec25620e6bb332
diff --git a/api/app/services/spree/api/v3/filters_aggregator.rb b/api/app/services/spree/api/v3/filters_aggregator.rbindex 0bdb9335fa..e8c84beb13 100644--- a/api/app/services/spree/api/v3/filters_aggregator.rb+++ b/api/app/services/spree/api/v3/filters_aggregator.rb@@ -43,7 +43,8 @@ module Spreeenddef price_filter- prices = Spree::Price.for_products(@scope, @currency)+ # Remove ordering to avoid PostgreSQL DISTINCT + ORDER BY conflicts+ prices = Spree::Price.for_products(@scope.reorder(''), @currency)min = prices.minimum(:amount)max = prices.maximum(:amount)return nil if min.nil? || max.nil?diff --git a/api/spec/integration/spree/api/v3/store/customers_spec.rb b/api/spec/integration/spree/api/v3/store/customers_spec.rbindex 07c2bd68e8..2eff8960ca 100644--- a/api/spec/integration/spree/api/v3/store/customers_spec.rb+++ b/api/spec/integration/spree/api/v3/store/customers_spec.rb@@ -5,7 +5,7 @@ require 'swagger_helper'RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/store.yaml' doinclude_context 'API v3 Store'- path '/api/v3/store/customers/me' do+ path '/api/v3/store/customer' doget 'Get current customer profile' dotags 'Customers'produces 'application/json'