web/views/actions.py
branchstable
changeset 7100 0f02ad198c1b
parent 6961 686c59dfc401
child 7744 bb956f43e8d4
--- a/web/views/actions.py	Wed Mar 23 11:35:41 2011 +0100
+++ b/web/views/actions.py	Wed Mar 23 18:20:34 2011 +0100
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -28,7 +28,7 @@
 from cubicweb.appobject import objectify_selector
 from cubicweb.selectors import (EntitySelector, yes,
     one_line_rset, multi_lines_rset, one_etype_rset, relation_possible,
-    nonempty_rset, non_final_entity,
+    nonempty_rset, non_final_entity, score_entity,
     authenticated_user, match_user_groups, match_search_state,
     has_permission, has_add_permission, is_instance, debug_mode,
     )
@@ -322,7 +322,7 @@
     """when displaying the schema of a CWEType, offer to list entities of that type
     """
     __regid__ = 'entitiesoftype'
-    __select__ = one_line_rset() & is_instance('CWEType')
+    __select__ = one_line_rset() & is_instance('CWEType') & score_entity(lambda x: not x.final)
     category = 'mainactions'
     order = 40