diff --git a/erpnext/patches/jan_mar_2012/latest/cleanups.py b/erpnext/patches/jan_mar_2012/latest/cleanups.py index 44d24c034b..9a78a70dd5 100644 --- a/erpnext/patches/jan_mar_2012/latest/cleanups.py +++ b/erpnext/patches/jan_mar_2012/latest/cleanups.py @@ -2,6 +2,7 @@ import webnotes def execute(): from webnotes.model import delete_doc + from webnotes.modules import reload_doc delete_doc("DocType", "SSO Control") delete_doc("DocType", "WN ERP Client Control") delete_doc("DocType", "Production Tips Common") @@ -18,7 +19,8 @@ def execute(): webnotes.conn.sql("""delete from tabSingles where field like 'startup_%' and doctype='Control Panel'""") - + webnotes.conn.sql("""delete from __SessionCache""") + webnotes.conn.commit() # DDLs @@ -30,4 +32,4 @@ def execute(): except: pass webnotes.conn.sql("""alter table __PatchLog engine=InnoDB""") - \ No newline at end of file + diff --git a/index.cgi b/index.cgi index a119daeeda..bc1de92863 100755 --- a/index.cgi +++ b/index.cgi @@ -19,7 +19,13 @@ def init(): webnotes.form_dict[key] = webnotes.form.getvalue(key) # init request - webnotes.http_request = webnotes.auth.HTTPRequest() + try: + webnotes.http_request = webnotes.auth.HTTPRequest() + except Exception, e: + if webnotes.response['message']=='Authentication Failed': + pass + else: + raise e def respond(): import webnotes @@ -34,4 +40,4 @@ def respond(): if __name__=="__main__": init() - respond() \ No newline at end of file + respond()