[fix] [minor] patches

This commit is contained in:
Nabin Hait 2013-10-24 14:55:29 +05:30
parent dc08fdfc99
commit 8f185b7d3b

View File

@ -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()
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