X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/5b6a2d94cebef6d12c2eaf32c010e3a0a8fbf329..542183dd43e3d9c9260b2ce1313126b7f6535f6c:/code/view.py?ds=sidebyside diff --git a/code/view.py b/code/view.py index e1ba854..d15d53f 100644 --- a/code/view.py +++ b/code/view.py @@ -112,7 +112,8 @@ cherrypy.tools.remote_user_login = cherrypy.Tool('on_start_resource', remote_use def invirtwebstate_init(): """Initialize the cherrypy.request.state object from Invirt""" - cherrypy.request.state = State(cherrypy.request.login) + if not hasattr(cherrypy.request, "state"): + cherrypy.request.state = State(cherrypy.request.login) cherrypy.tools.invirtwebstate = cherrypy.Tool('on_start_resource', invirtwebstate_init, priority=100)