mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 00:44:45 +00:00
run set query if doctype exist (#14929)
This commit is contained in:
@@ -10,7 +10,8 @@ def execute():
|
|||||||
'Timesheet', 'Sales Person', 'Payroll Employee Detail']
|
'Timesheet', 'Sales Person', 'Payroll Employee Detail']
|
||||||
|
|
||||||
for doctype in doctypes_to_update:
|
for doctype in doctypes_to_update:
|
||||||
frappe.db.sql("""
|
if frappe.db.table_exists(doctype):
|
||||||
update `tab%s` dt
|
frappe.db.sql("""
|
||||||
set department=(select department from `tabEmployee` where name=dt.employee)
|
update `tab%s` dt
|
||||||
""" % doctype)
|
set department=(select department from `tabEmployee` where name=dt.employee)
|
||||||
|
""" % doctype)
|
||||||
|
|||||||
Reference in New Issue
Block a user