diff -r 2490e18fd3c8 -r 554eb4dd533d web/views/tabs.py --- a/web/views/tabs.py Thu May 28 20:07:18 2009 +0200 +++ b/web/views/tabs.py Thu May 28 22:56:38 2009 +0200 @@ -14,7 +14,7 @@ from cubicweb.selectors import partial_has_related_entities from cubicweb.view import EntityView from cubicweb.common import tags, uilib - +from cubicweb.utils import make_uid class LazyViewMixin(object): """provides two convenience methods for the tab machinery @@ -92,11 +92,11 @@ continue return selected_tabs - def render_tabs(self, tabs, default, entity): + def render_tabs(self, tabs, default, entity=None): # tabbed views do no support concatenation # hence we delegate to the default tab if there is more than on entity # in the result set - if len(self.rset) > 1: + if entity and len(self.rset) > 1: entity.view(default, w=self.w) return # XXX (syt) fix below add been introduced at some point to fix something @@ -118,7 +118,11 @@ active_tab = self.active_tab(tabs, default) # build the html structure w = self.w - w(u'