[req] fix find() generating non-rewritable rql on non final relations
When filtering on a relation, find() was generating rql like
'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it
should probably not), but when applying some rewrite (eg. permissions) it raise
in rqlrewrite code.
def _use_orig_term(self, snippet_varname, term):
...
> self.rewritten[key] = term.name
E AttributeError: 'Constant' object has no attribute 'name'
Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.
CubicWeb semantic web framework
===============================
CubicWeb is a entities / relations based knowledge management system
developped at Logilab.
This package contains:
- a repository server
- a RQL command line client to the repository
- an adaptative modpython interface to the server
- a bunch of other management tools
Install
-------
More details at https://cubicweb.readthedocs.io/en/3.25/book/admin/setup
Getting started
---------------
Execute::
apt-get install cubicweb cubicweb-dev cubicweb-blog
cubicweb-ctl create blog myblog
cubicweb-ctl start -D myblog
sensible-browser http://localhost:8080/
Details at https://cubicweb.readthedocs.io/en/3.25/tutorials/base/blog-in-five-minutes
Documentation
-------------
Look in the doc/ subdirectory or read https://cubicweb.readthedocs.io/en/3.25/
CubicWeb includes the Entypo pictograms by Daniel Bruce — http://www.entypo.com
Contributing
------------
Patches should be submitted by email at the cubicweb-devel@lists.cubicweb.org
mailing list in order to get reviewed by project integrators or any community
member.
The simplest way of send patches is to use the ``hg email`` command available
through the *patchbomb* extension of Mercurial. Preferably, patches should be
*in the message body* of emails. When submitting a revised version of a patch
series, a prefix indicating the iteration number ``<n>`` of the series should
be added to email subject prefixes; this can be achieved by specifying a
``--flag v<n>`` option to ``hg email`` command.