From 8f185b7d3bd0dd1d782326b59322d8f3cae06924 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 24 Oct 2013 14:55:29 +0530 Subject: [PATCH] [fix] [minor] patches --- .../p06_update_control_panel_and_global_defaults.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/patches/october_2013/p06_update_control_panel_and_global_defaults.py b/patches/october_2013/p06_update_control_panel_and_global_defaults.py index 7f40fb40914..8c12107f7cb 100644 --- a/patches/october_2013/p06_update_control_panel_and_global_defaults.py +++ b/patches/october_2013/p06_update_control_panel_and_global_defaults.py @@ -12,7 +12,10 @@ def execute(): time_zone = webnotes.conn.sql("""select value from `tabSingles` where field='timezone' and doctype='Control Panel'""") - gb_bean = webnotes.bean("Global Defaults") - gb_bean.doc.country = country and country[0][0] or None - gb_bean.doc.time_zone = time_zone and time_zone[0][0] or None - gb_bean.save() \ No newline at end of file + try: + gb_bean = webnotes.bean("Global Defaults") + gb_bean.doc.country = country and country[0][0] or None + gb_bean.doc.time_zone = time_zone and time_zone[0][0] or None + gb_bean.save() + except: + pass \ No newline at end of file