[ui tabs] avoid duplicate rset argument if already specified in tab kwargs. Closes #2464786
--- 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)