Skip to content
Snippets Groups Projects
Commit 7e2c2fbbe841 authored by Sandrine Ribeau's avatar Sandrine Ribeau
Browse files

[views] use score_entity instead of rql_condition

parent ea019423d4ea
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
from cubicweb.selectors import (one_line_rset, but_etype, implements, from cubicweb.selectors import (one_line_rset, but_etype, implements,
has_permission, relation_possible, yes, has_permission, relation_possible, yes,
match_kwargs, rql_condition) match_kwargs, score_entity)
from cubicweb.view import EntityView from cubicweb.view import EntityView
from cubicweb.common.uilib import rql_for_eid, cut, safe_cut from cubicweb.common.uilib import rql_for_eid, cut, safe_cut
from cubicweb.common.mixins import TreeViewMixIn from cubicweb.common.mixins import TreeViewMixIn
...@@ -318,8 +318,8 @@ ...@@ -318,8 +318,8 @@
class DelteCommentAction(Action): class DelteCommentAction(Action):
id = 'delete_comment' id = 'delete_comment'
__select__ = implements('Comment') & has_permission('delete') \ __select__ = implements('Comment') & \
& rql_condition('NOT EXISTS(C comments X)') score_entity(lambda x: not x.reverse_comments and x.has_perm('delete'))
title = _('delete comment') title = _('delete comment')
category = 'hidden' category = 'hidden'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment