From 986d48b424ed3895b8a8ce05e8e9a988de90cf14 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 4 Mar 2013 16:29:48 +0530 Subject: [PATCH] timesheet patch update --- patches/february_2013/p09_timesheets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/february_2013/p09_timesheets.py b/patches/february_2013/p09_timesheets.py index 4ffa59cead..2242d6b629 100644 --- a/patches/february_2013/p09_timesheets.py +++ b/patches/february_2013/p09_timesheets.py @@ -12,7 +12,11 @@ def execute(): custom_field.doctype = "Custom Field" custom_field.dt = "Time Log" custom_field.insert_after = None - cf = webnotes.bean(custom_field).insert() + try: + cf = webnotes.bean(custom_field).insert() + except Exception, e: + # duplicate custom field + pass for name in webnotes.conn.sql_list("""select name from tabTimesheet"""): ts = webnotes.bean("Timesheet", name)