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.

Make Variant validate `option_value_variants` isntead of `option_valu… (#12163)

Damian Legawiec9e2295b7f341
diff --git a/core/app/models/spree/variant.rb b/core/app/models/spree/variant.rb
index e35380ccff..bc66ed8e45 100644
--- a/core/app/models/spree/variant.rb
+++ b/core/app/models/spree/variant.rb
@@ -55,7 +55,7 @@ module Spree
validate :check_price
- validates :option_values, presence: true, unless: :is_master?
+ validates :option_value_variants, presence: true, unless: :is_master?
with_options numericality: { greater_than_or_equal_to: 0, allow_nil: true } do
validates :cost_price