diff --git a/india_compliance/gst_india/doctype/gstin/gstin.py b/india_compliance/gst_india/doctype/gstin/gstin.py index 0aaf5d19a..c833d8b28 100644 --- a/india_compliance/gst_india/doctype/gstin/gstin.py +++ b/india_compliance/gst_india/doctype/gstin/gstin.py @@ -350,7 +350,7 @@ def validate_gst_transporter_id(transporter_id): ) # If GSTIN status is not Active and transporter_id_status is None, use Transporter ID API - if gstin.status and gstin.status != "Active" and not gstin.transporter_id_status: + if gstin and gstin.status != "Active" and not gstin.transporter_id_status: gstin = create_or_update_gstin_status( transporter_id, is_transporter_id=True,