Merge pull request #15650 from rohitwaghchaure/fix_gst_state_issue

[Fix] Nontype object has no attribute gst_state
This commit is contained in:
rohitwaghchaure 2018-10-11 10:53:46 +05:30 committed by GitHub
commit b1241caf48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ def get_place_of_supply(out, doctype):
if address_name:
address = frappe.db.get_value("Address", address_name, ["gst_state", "gst_state_number"], as_dict=1)
if address.gst_state and address.gst_state_number:
if address and address.gst_state and address.gst_state_number:
return cstr(address.gst_state_number) + "-" + cstr(address.gst_state)
def get_regional_address_details(out, doctype, company):