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 `Base#json_api_permitted_attributes` for models using `acts_as_nested_set`
Damian Legawiec23222639e54a
diff --git a/core/app/models/spree/base.rb b/core/app/models/spree/base.rbindex f574311dde..48e8ded9c0 100644--- a/core/app/models/spree/base.rb+++ b/core/app/models/spree/base.rb@@ -50,7 +50,13 @@ class Spree::Base < ApplicationRecordenddef self.json_api_permitted_attributes- column_names.reject { |c| c == 'id' }+ skipped_attributes = %w[id]++ if included_modules.include?(CollectiveIdea::Acts::NestedSet::Model)+ skipped_attributes.push('lft', 'rgt', 'depth')+ end++ column_names.reject { |c| skipped_attributes.include?(c.to_s) }enddef self.json_api_type