--- 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