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.

Fixed `Zone#country_list` zeitwerk issues

Damian Legawiecff71b70ddc4b
diff --git a/core/app/models/spree/zone.rb b/core/app/models/spree/zone.rb
index 4bcb762e44..52a43f5931 100644
--- a/core/app/models/spree/zone.rb
+++ b/core/app/models/spree/zone.rb
@@ -111,10 +111,10 @@ module Spree
def country_list
@countries ||= case kind
when 'country' then
- zoneables
+ Country.where(id: country_ids)
when 'state' then
- zoneables.collect(&:country)
- end.flatten.compact.uniq
+ Country.where(id: zoneables.collect(&:country_id))
+ end
end
def <=>(other)