From b1ff4daaf51645451eb6f2c01a9c13f91a79b665 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 12 Mar 2026 12:03:28 +0530 Subject: [PATCH] fix: NoneType error when template description is to be copied to variant (#53358) --- erpnext/controllers/item_variant.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index f539ef15536..689f0c6a3f6 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -366,13 +366,13 @@ def copy_attributes_to_variant(item, variant): else: if item.variant_based_on == "Item Attribute": if variant.attributes: - attributes_description = item.description + " " + attributes_description = item.description or "" for d in variant.attributes: attributes_description += ( "
" + d.attribute + ": " + cstr(d.attribute_value) + "
" ) - if attributes_description not in variant.description: + if attributes_description not in (variant.description or ""): variant.description = attributes_description