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.

Add .reload in product_carousel method to prevent query errors while using postgres

piotrpanko576c0aedbbcc
diff --git a/frontend/app/controllers/spree/taxons_controller.rb b/frontend/app/controllers/spree/taxons_controller.rb
index 629d5d5776..d85ccc5107 100644
--- a/frontend/app/controllers/spree/taxons_controller.rb
+++ b/frontend/app/controllers/spree/taxons_controller.rb
@@ -16,7 +16,7 @@ module Spree
def product_carousel
if stale?(etag: carousel_etag, last_modified: last_modified, public: true)
load_products
- if @products.any?
+ if @products.reload.any?
render template: 'spree/taxons/product_carousel', layout: false
else
head :no_content