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
Change `includes` to `preload` in Spree::Admin::ImagesController
Damian Kaczmarczyk9cca7c397d56
diff --git a/backend/app/controllers/spree/admin/images_controller.rb b/backend/app/controllers/spree/admin/images_controller.rbindex 37d4448b2a..7d8ffb2c6b 100644--- a/backend/app/controllers/spree/admin/images_controller.rb+++ b/backend/app/controllers/spree/admin/images_controller.rb@@ -18,11 +18,11 @@ module Spreeenddef load_index_data- @product = Product.friendly.includes(*variant_index_includes).find(params[:product_id])+ @product = Product.friendly.preload(*variant_index_includes).find(params[:product_id])enddef load_edit_data- @product = Product.friendly.includes(*variant_edit_includes).find(params[:product_id])+ @product = Product.friendly.preload(*variant_edit_includes).find(params[:product_id])@variants = @product.variants.map do |variant|[variant.sku_and_options_text, variant.id]end