[ui tabs] avoid duplicate rset argument if already specified in tab kwargs. Closes #2464786 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 23 Aug 2012 11:19:44 +0200
branchstable
changeset 8526 ed0fbbf507bb
parent 8524 d2a6163ce0d5
child 8527 6151b0199bc1
[ui tabs] avoid duplicate rset argument if already specified in tab kwargs. Closes #2464786
web/views/tabs.py
--- a/web/views/tabs.py	Fri Aug 31 18:11:24 2012 +0200
+++ b/web/views/tabs.py	Thu Aug 23 11:19:44 2012 +0200
@@ -119,11 +119,11 @@
             else:
                 tabid, tabkwargs = tab
                 tabkwargs = tabkwargs.copy()
+            tabkwargs.setdefault('rset', self.cw_rset)
             vid = tabkwargs.get('vid', tabid)
             domid = uilib.domid(tabid)
             try:
-                viewsvreg.select(vid, self._cw, rset=self.cw_rset,
-                                 tabid=domid, **tabkwargs)
+                viewsvreg.select(vid, self._cw, tabid=domid, **tabkwargs)
             except NoSelectableObject:
                 continue
             selected_tabs.append((tabid, domid, tabkwargs))
@@ -158,7 +158,6 @@
         w(u'</ul>')
         for tabid, domid, tabkwargs in tabs:
             w(u'<div id="%s">' % domid)
-            tabkwargs.setdefault('rset', self.cw_rset)
             if self.lazy:
                 tabkwargs.setdefault('tabid', domid)
                 tabkwargs.setdefault('vid', tabid)