pyramid_cubicweb/rest_api.py
changeset 11598 2dc0b0db2329
parent 11597 286611d1d7a4
child 11599 f8ba6ea94af9
--- a/pyramid_cubicweb/rest_api.py	Thu Aug 27 11:25:42 2015 +0200
+++ b/pyramid_cubicweb/rest_api.py	Mon Jun 15 09:31:37 2015 +0200
@@ -21,13 +21,13 @@
                                     'x', 'Substitute')
         if self.attrname == 'eid':
             try:
-                rset = self.request.cw_cnx.execute(
+                rset = self.request.cw_request.execute(
                     st.as_string(), {'x': int(self.value)})
             except (ValueError, TypeResolverException):
                 # conflicting eid/type
                 raise HTTPNotFound()
         else:
-            rset = self.request.cw_cnx.execute(
+            rset = self.request.cw_request.execute(
                 st.as_string(), {'x': unicode(self.value)})
         return rset