[PATCH seda] [views] Add selector to avoid displaying the seda tree on multi-lines rset

Sylvain Thenault sylvain.thenault at logilab.fr
Tue Mar 14 12:12:40 CET 2017


# HG changeset patch
# User Sylvain Thénault <sylvain.thenault at logilab.fr>
# Date 1489139421 -3600
#      Fri Mar 10 10:50:21 2017 +0100
# Node ID 597e2e1bd3e45b25580f44426caa515c327a926f
# Parent  d331fbee620a18b66b60f7cc518c395cb5e53342
[views] Add selector to avoid displaying the seda tree on multi-lines rset

this causes an error during automatic tests, and we don't want that anyway.

diff --git a/cubicweb_seda/views/sedatree.py b/cubicweb_seda/views/sedatree.py
--- a/cubicweb_seda/views/sedatree.py
+++ b/cubicweb_seda/views/sedatree.py
@@ -14,21 +14,23 @@
 # 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/>.
 """cubicweb-seda views for ArchiveUnit"""
 
 from cubicweb import _
-from cubicweb.predicates import adaptable, is_instance
+from cubicweb.predicates import adaptable, is_instance, one_line_rset
 from cubicweb.web import component
 
 from ..entities import simplified_profile, component_unit
 from . import jqtree
 
 
 class ProfileTreeComponent(component.EntityCtxComponent):
     """Display the whole profile tree."""
     __regid__ = 'seda.tree'
-    __select__ = component.EntityCtxComponent.__select__ & adaptable('ITreeBase')
+    __select__ = (component.EntityCtxComponent.__select__
+                  & one_line_rset()
+                  & adaptable('ITreeBase'))
     context = 'left'
     order = -1
     title = _('SEDA profile tree')
 
     def render_body(self, w):


More information about the saem-devel mailing list