fix: NoneType object has no attribute "gstin" (#16458)
* fix: NoneType object has no attribute "gstin"
* fix: handle NoneType values
diff --git a/erpnext/regional/india/utils.py b/erpnext/regional/india/utils.py
index fd0eb34..d7a0258 100644
--- a/erpnext/regional/india/utils.py
+++ b/erpnext/regional/india/utils.py
@@ -5,7 +5,7 @@
from erpnext.controllers.taxes_and_totals import get_itemised_tax, get_itemised_taxable_amount
def validate_gstin_for_india(doc, method):
- if not hasattr(doc, 'gstin'):
+ if not hasattr(doc, 'gstin') or not doc.gstin:
return
doc.gstin = doc.gstin.upper().strip()