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.

When attributes aren't symbolized before passing this leads to severa… (#11739)

Damian Legawiec987a74d6cd68
diff --git a/core/app/models/spree/order/address_book.rb b/core/app/models/spree/order/address_book.rb
index 6d7d6dc15e..67b09cbda0 100644
--- a/core/app/models/spree/order/address_book.rb
+++ b/core/app/models/spree/order/address_book.rb
@@ -54,6 +54,7 @@ module Spree
return if attributes.blank?
attributes.transform_values! { |v| v == '' ? nil : v }
+ attributes = attributes.symbolize_keys
default_address_scope = user ? user.addresses : ::Spree::Address
default_address = default_address_scope.find_by(id: attributes[:id])