From 44c3820a8f43d50fa1eda03eb852f0bf1de341b3 Mon Sep 17 00:00:00 2001 From: "Nihal M. Kelanthodika" Date: Wed, 15 Dec 2021 12:30:10 +0530 Subject: [PATCH] Update units when variant unit name is edited --- app/models/spree/product.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index d5e9c5f929..dc8ba0c7a9 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -431,7 +431,7 @@ module Spree end def update_units - return unless saved_change_to_variant_unit? + return unless saved_change_to_variant_unit? || saved_change_to_variant_unit_name? option_types.delete self.class.all_variant_unit_option_types option_types << variant_unit_option_type if variant_unit.present?