fix: return when Hub Tracked Item is empty

This commit is contained in:
Mangesh-Khairnar 2019-12-27 14:48:14 +05:30 committed by GitHub
parent cca6fb2794
commit c7ce597b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,10 @@ import frappe
def execute():
frappe.reload_doc("Hub Node", "doctype", "Hub Tracked Item")
if frappe.db.a_row_exists("Hub Tracked Item"):
if not frappe.db.a_row_exists("Hub Tracked Item"):
return
frappe.db.sql('''
Update `tabHub Tracked Item`
SET published = 1
''')
''')