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 validation for StorePaymentMethod

Damian Legawiec2eaf480a7ecd
diff --git a/core/app/models/spree/store_payment_method.rb b/core/app/models/spree/store_payment_method.rb
index 7d41005569..fd8b8249ca 100644
--- a/core/app/models/spree/store_payment_method.rb
+++ b/core/app/models/spree/store_payment_method.rb
@@ -6,6 +6,6 @@ module Spree
belongs_to :payment_method, class_name: 'Spree::PaymentMethod', touch: true
validates :store, :payment_method, presence: true
- validates :store_id, uniqueness: { scope: :product_id }
+ validates :store_id, uniqueness: { scope: :payment_method_id }
end
end