web/test/data/views.py
changeset 5244 5467674ad101
parent 4212 ab6573088b4a
child 5423 e15abfdcce38
--- a/web/test/data/views.py	Wed Apr 14 10:25:51 2010 +0200
+++ b/web/test/data/views.py	Wed Apr 14 10:29:38 2010 +0200
@@ -14,7 +14,7 @@
 # user
 # NOTE: this require "cookie" authentication mode
 def auto_login_publish(self, path, req):
-    if (req.cnx is None or req.cnx.anonymous_connection) and req.form.get('__fblogin'):
+    if (not req.cnx or req.cnx.anonymous_connection) and req.form.get('__fblogin'):
         login = password = req.form.pop('__fblogin')
         self.repo.register_user(login, password)
         req.form['__login'] = login