Migrate employee field to timesheet only if it exists in time log
This commit is contained in:
parent
0f0c131ba4
commit
142f14dd5c
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
if frappe.db.table_exists("Time Log"):
|
if frappe.db.table_exists("Time Log") and "employee" in frappe.db.get_table_columns("Time Log"):
|
||||||
timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name,
|
timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name,
|
||||||
tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner
|
tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner
|
||||||
from
|
from
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user