From 42de8979dcd3b9620809baf9aa0d1c35da7f8fb2 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Wed, 27 Feb 2008 21:32:39 +0000 Subject: [PATCH] For demo accounts, no longer doing automatic redirect to first notebook thing when you hit "/" without a referrer. --- controller/Root.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/Root.py b/controller/Root.py index d3f8ee8..b0fcab0 100644 --- a/controller/Root.py +++ b/controller/Root.py @@ -151,7 +151,7 @@ class Root( object ): referer = cherrypy.request.headerMap.get( u"Referer" ) if not referer: user = self.__database.load( User, user_id ) - if user: + if user and user.username: first_notebook = self.__database.select_one( Notebook, user.sql_load_notebooks( parents_only = True, undeleted_only = True ) ) if first_notebook: return dict( redirect = u"%s/notebooks/%s" % ( https_url, first_notebook.object_id ) )