unrelated_rql now return rql *and* args 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Sep 2009 14:30:32 +0200
branch3.5
changeset 3243 54e07f97c17f
parent 3242 390acf7594ed
child 3244 1fc804b2c5ba
unrelated_rql now return rql *and* args
web/views/editviews.py
--- a/web/views/editviews.py	Wed Sep 16 14:29:29 2009 +0200
+++ b/web/views/editviews.py	Wed Sep 16 14:30:32 2009 +0200
@@ -50,10 +50,10 @@
         # them. Use fetch_order and not fetch_unrelated_order as sort method
         # since the latter is mainly there to select relevant items in the combo
         # box, it doesn't give interesting result in this context
-        rql = entity.unrelated_rql(rtype, etype, role,
+        rql, args = entity.unrelated_rql(rtype, etype, role,
                                    ordermethod='fetch_order',
                                    vocabconstraints=False)
-        rset = self.req.execute(rql, {'x' : entity.eid}, 'x')
+        rset = self.req.execute(rql, args, tuple(args))
         return rset, 'list', "search-associate-content", True