fixes in patch
diff --git a/patches/february_2013/update_company_in_leave_application.py b/patches/february_2013/update_company_in_leave_application.py
index eaf03b6..be07cb8 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 @@
`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