fix: Variable scope issue

This commit is contained in:
Deepesh Garg
2021-04-16 15:51:45 +05:30
parent 66773cabef
commit 868b816c5a

View File

@@ -573,7 +573,7 @@ class GSPConnector():
gstin = self.get_seller_gstin() gstin = self.get_seller_gstin()
credentials_for_gstin = [d for d in self.e_invoice_settings.credentials if d.gstin == gstin] credentials_for_gstin = [d for d in self.e_invoice_settings.credentials if d.gstin == gstin]
if credentials_for_gstin: if credentials_for_gstin:
self.credentials = credentials_for_gstin[0] credentials = credentials_for_gstin[0]
else: else:
frappe.throw(_('Cannot find e-invoicing credentials for selected Company GSTIN. Please check E-Invoice Settings')) frappe.throw(_('Cannot find e-invoicing credentials for selected Company GSTIN. Please check E-Invoice Settings'))
else: else: