fix: sider issues

This commit is contained in:
Saqib Ansari 2021-12-06 15:38:19 +05:30
parent 32c81818f6
commit 10b87e081c

View File

@ -7,21 +7,21 @@ def execute():
for doctype in active_sla_documents: for doctype in active_sla_documents:
doctype = frappe.qb.DocType(doctype) doctype = frappe.qb.DocType(doctype)
try: try:
query = ( frappe.qb.update(
frappe.qb doctype
.update(doctype) ).set(
.set(doctype.agreement_status, 'First Response Due') doctype.agreement_status, 'First Response Due'
.where( ).where(
(doctype.first_responded_on.isnull()) | (doctype.first_responded_on == '') (doctype.first_responded_on.isnull()) | (doctype.first_responded_on == '')
) ).run()
)
query.run() frappe.qb.update(
query = ( doctype
frappe.qb ).set(
.update(doctype) doctype.agreement_status, 'Resolution Due'
.set(doctype.agreement_status, 'Resolution Due') ).where(
.where(doctype.agreement_status == 'Ongoing') doctype.agreement_status == 'Ongoing'
) ).run()
query.run()
except Exception as e: except Exception:
frappe.log_error('Failed to Patch SLA Status') frappe.log_error('Failed to Patch SLA Status')