From f492d5f61def944bebe82a9155289b7e43e4b673 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 9 Apr 2019 15:19:10 +0530 Subject: [PATCH] fix: Validate variant attributes only if is_new --- erpnext/stock/doctype/item/item.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py index e93e7d9b615..8f93c3f7ff2 100644 --- a/erpnext/stock/doctype/item/item.py +++ b/erpnext/stock/doctype/item/item.py @@ -767,7 +767,7 @@ class Item(WebsiteGenerator): attributes.append(d.attribute) def validate_variant_attributes(self): - if self.variant_of and self.variant_based_on == 'Item Attribute': + if self.is_new() and self.variant_of and self.variant_based_on == 'Item Attribute': args = {} for d in self.attributes: if cstr(d.attribute_value).strip() == '':