use get_global_default instead of control panel

This commit is contained in:
Nabin Hait
2013-03-06 13:15:08 +05:30
parent 7804401d03
commit 87b9cd5ba1
6 changed files with 30 additions and 17 deletions

View File

@@ -0,0 +1,11 @@
import webnotes
import webnotes.defaults
def execute():
# sesison expiry missing
if not webnotes.defaults.get_global_default("session_expiry"):
gd = webnotes.bean("Global Defaults", "Global Defaults")
gd.doc.session_expiry = webnotes.conn.get_value('Control Panel', None, 'session_expiry') \
or '06:00'
gd.save()