mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix typo in sample_data zone creation (zonEable) and added clause to avoid re-adding the same country to the zone
This commit is contained in:
@@ -15,7 +15,7 @@ module Addressing
|
||||
|
||||
def zone
|
||||
zone = Spree::Zone.find_or_create_by_name!(ENV.fetch('CHECKOUT_ZONE'))
|
||||
zone.members.create!(zonable: country)
|
||||
zone.members.create!(zoneable: country) unless zone.zoneables.include?(country)
|
||||
zone
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user