mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
Do not stomp address on create
This commit is contained in:
@@ -115,8 +115,8 @@ module Admin
|
||||
|
||||
def build_resource_with_address
|
||||
enterprise = build_resource_without_address
|
||||
enterprise.address = Spree::Address.new
|
||||
enterprise.address.country = Spree::Country.find_by_id(Spree::Config[:default_country_id])
|
||||
enterprise.address ||= Spree::Address.new
|
||||
enterprise.address.country ||= Spree::Country.find_by_id(Spree::Config[:default_country_id])
|
||||
enterprise
|
||||
end
|
||||
alias_method_chain :build_resource, :address
|
||||
|
||||
Reference in New Issue
Block a user