avoid SelectAction selection to crash on startup views stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 18 May 2009 08:17:58 +0200
branchstable
changeset 1829 f54710fcdd62
parent 1828 e9e8beb06f01
child 1834 c153913924a5
avoid SelectAction selection to crash on startup views
web/views/actions.py
--- a/web/views/actions.py	Fri May 15 14:00:43 2009 +0200
+++ b/web/views/actions.py	Mon May 18 08:17:58 2009 +0200
@@ -9,7 +9,7 @@
 from cubicweb.vregistry import objectify_selector
 from cubicweb.selectors import (EntitySelector,
     one_line_rset, two_lines_rset, one_etype_rset, relation_possible,
-    non_final_entity,
+    nonempty_rset, non_final_entity,
     authenticated_user, match_user_groups, match_search_state,
     has_permission, has_add_permission,
     )
@@ -74,7 +74,7 @@
     if accept match.
     """
     id = 'select'
-    __select__ = match_search_state('linksearch') & match_searched_etype()
+    __select__ = match_search_state('linksearch') & nonempty_rset() & match_searched_etype()
 
     title = _('select')
     category = 'mainactions'