commit | 41cb6cc491e7dd5df79e15c33b820549fde352d4 | [log] [tgz] |
---|---|---|
author | Zlash65 <zarrar65@gmail.com> | Mon May 21 15:08:16 2018 +0530 |
committer | Zlash65 <zarrar65@gmail.com> | Mon May 21 15:10:06 2018 +0530 |
tree | 4e1b46add974bf859f6707199dd7c23157b32263 | |
parent | 6d2dfac44e0f116193d9aa02acb1b0b5edf3fa63 [diff] |
patch fix - skip query if no when_then case
diff --git a/erpnext/patches/v11_0/create_department_records_for_each_company.py b/erpnext/patches/v11_0/create_department_records_for_each_company.py index bef524c..17e3ebd 100644 --- a/erpnext/patches/v11_0/create_department_records_for_each_company.py +++ b/erpnext/patches/v11_0/create_department_records_for_each_company.py
@@ -47,6 +47,9 @@ THEN "%s" '''%(company, department, records[department])) + if not when_then: + return + frappe.db.sql(""" update `tab%s`