[tabs] avoid nasty surprises when tab name change & the cookie remembers the past
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 27 Jan 2009 19:12:37 +0100
changeset 487 355356b781d7
parent 486 831d5179cb3a
child 488 2984b3ec7034
[tabs] avoid nasty surprises when tab name change & the cookie remembers the past
web/views/tabs.py
--- a/web/views/tabs.py	Tue Jan 27 18:49:56 2009 +0100
+++ b/web/views/tabs.py	Tue Jan 27 19:12:37 2009 +0100
@@ -58,8 +58,9 @@
         if activetab is None:
             cookie['active_tab'] = default
             self.req.set_cookie(cookie, 'active_tab')
-            return default
-        tab = activetab.value
+            tab = default
+        else:
+            tab = activetab.value
         return tab if tab in tabs else default
 
     def render_tabs(self, tabs, default, entity):