fix: NoneType object has no attribute "gstin" (#16458)

* fix: NoneType object has no attribute "gstin"

* fix: handle NoneType values
This commit is contained in:
FinByz Tech Pvt. Ltd 2019-01-22 20:49:06 +05:30 committed by Sagar Vora
parent 33bc3f3309
commit 237a871f17

View File

@ -5,7 +5,7 @@ from erpnext.regional.india import states, state_numbers
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()