fix: patch condition (#25301)

This commit is contained in:
Saqib 2021-04-12 19:02:28 +05:30 committed by GitHub
parent 9320316462
commit a19c98255f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,5 +12,5 @@ def execute():
select dl.link_name from `tabAddress` a, `tabDynamic Link` dl
where a.gstin = %s and dl.parent = a.name and dl.link_doctype = 'Company'
""", (creds.get('gstin')))
if company_name[0]:
if company_name and len(company_name) == 1:
frappe.db.set_value('E Invoice User', creds.get('name'), 'company', company_name[0][0])