fixed to timesheet patch
diff --git a/patches/february_2013/p09_timesheets.py b/patches/february_2013/p09_timesheets.py
index b61566f..9a9d420 100644
--- a/patches/february_2013/p09_timesheets.py
+++ b/patches/february_2013/p09_timesheets.py
@@ -5,7 +5,12 @@
for name in webnotes.conn.sql_list("""select name from tabTimesheet"""):
ts = webnotes.bean("Timesheet", name)
for tsd in ts.doclist.get({"doctype":"Timesheet Detail"}):
- tl = webnotes.bean({
+ if not webnotes.conn.exists("Project", tsd.project_name):
+ tsd.project_name = None
+ if not webnotes.conn.exists("Task", tsd.task_id):
+ tsd.task_id = None
+
+ tl = webnotes.doc({
"doctype": "Time Log",
"status": "Draft",
"from_time": ts.doc.timesheet_date + " " + tsd.act_start_time,