From 7e0b9a421272298501c9316bed6007d8b25a02fc Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Feb 2013 10:58:15 +0530 Subject: [PATCH] fixes in patch --- patches/february_2013/update_company_in_leave_application.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patches/february_2013/update_company_in_leave_application.py b/patches/february_2013/update_company_in_leave_application.py index eaf03b6083..be07cb8f35 100644 --- a/patches/february_2013/update_company_in_leave_application.py +++ b/patches/february_2013/update_company_in_leave_application.py @@ -7,5 +7,6 @@ def execute(): `tabLeave Application`.employee = `tabEmployee`.name""") company = webnotes.conn.get_default("company") - webnotes.conn.sql("""update `tabLeave Application` - set company = %s where ifnull(company,'')=''""", company) \ No newline at end of file + if company: + webnotes.conn.sql("""update `tabLeave Application` + set company = %s where ifnull(company,'')=''""", company) \ No newline at end of file