From c52c2ebfe1c8815ec953c669894636ff937609cd Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Fri, 12 Jul 2024 18:20:19 +0500 Subject: [PATCH] 12570 - fix specs --- app/helpers/admin/products_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/admin/products_helper.rb b/app/helpers/admin/products_helper.rb index 20318ecc14..d0d5611d80 100644 --- a/app/helpers/admin/products_helper.rb +++ b/app/helpers/admin/products_helper.rb @@ -12,7 +12,7 @@ module Admin def prepare_new_variant(product) product.variants.build do |variant| - variant.unit_value = 1.0 * product.variant_unit_scale + variant.unit_value = 1.0 * (product.variant_unit_scale || 1) variant.unit_presentation = VariantUnits::OptionValueNamer.new(variant).name end end