Skip to content

Commit

Permalink
Merge pull request #1017 from resilient-tech/mergify/bp/version-14-ho…
Browse files Browse the repository at this point in the history
…tfix/pr-1016

fix: don't validate GSTIN Status if GSTIN is empty (backport #1016)
  • Loading branch information
vorasmit authored Aug 31, 2023
2 parents 3267418 + f964371 commit 01d86e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion india_compliance/gst_india/doctype/gstin/gstin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def get_gstin_status(gstin, transaction_date=None, is_request_from_ui=0):
"""
Permission check not required as GSTIN details are public where GSTIN is known.
"""
if not gstin:
return

if not is_status_refresh_required(gstin, transaction_date):
if not frappe.db.exists("GSTIN", gstin):
return
Expand All @@ -67,7 +70,7 @@ def get_updated_gstin(gstin, transaction_date=None, is_request_from_ui=0):
if is_request_from_ui:
return create_or_update_gstin_status(gstin)

return frappe.enqueue(
frappe.enqueue(
create_or_update_gstin_status,
enqueue_after_commit=True,
queue="short",
Expand Down

0 comments on commit 01d86e6

Please sign in to comment.