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.

Making sure we're always have Hash as attributes (#11740)

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