web/views/basecontrollers.py
changeset 5244 5467674ad101
parent 5223 6abd6e3599f4
child 5333 9eea4a5eaf1a
--- a/web/views/basecontrollers.py	Wed Apr 14 10:25:51 2010 +0200
+++ b/web/views/basecontrollers.py	Wed Apr 14 10:29:38 2010 +0200
@@ -116,10 +116,10 @@
         req = self._cw
         if rset is None and not hasattr(req, '_rql_processed'):
             req._rql_processed = True
-            if req.cnx is None:
+            if req.cnx:
+                rset = self.process_rql(req.form.get('rql'))
+            else:
                 rset = None
-            else:
-                rset = self.process_rql(req.form.get('rql'))
         if rset and rset.rowcount == 1 and '__method' in req.form:
             entity = rset.get_entity(0, 0)
             try: