Commit 69c14d41 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[pkg] Require cubicweb >= 3.25.4

And drop monkeypatch now in this version.
parent 2929e483c48a
......@@ -14,7 +14,7 @@ description = 'Data Exchange Standard for Archival'
web = 'http://www.cubicweb.org/project/%s' % distname
__depends__ = {
'cubicweb': '>= 3.25.3, < 3.26',
'cubicweb': '>= 3.25.4, < 3.26',
'six': '>= 1.4.0',
'cubicweb-eac': None,
'cubicweb-skos': '>= 0.12.1',
......
......@@ -14,28 +14,9 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
from logilab.common.decorators import monkeypatch
from cubicweb.entity import Entity
from cubicweb.rqlrewrite import RQLRelationRewriter
from cubicweb.server import ssplanner
Entity.cw_skip_copy_for.append(('container', 'subject'))
Entity.cw_skip_copy_for.append(('container', 'object'))
Entity.cw_skip_copy_for.append(('clone_of', 'subject'))
Entity.cw_skip_copy_for.append(('clone_of', 'object'))
# monkey-patch to allow using computed relation in WHERE clause of write queries
# (https://www.cubicweb.org/ticket/17113286)
@monkeypatch(ssplanner.SSPlanner)
def _select_plan(self, plan, select, solutions):
union = ssplanner.Union()
union.append(select)
select.clean_solutions(solutions)
ssplanner.add_types_restriction(self.schema, select)
rewriter = RQLRelationRewriter(plan.cnx)
rewriter.rewrite(union, plan.args)
self.rqlhelper.annotate(union)
return self.build_select_plan(plan, union)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment