summaryrefslogtreecommitdiff
path: root/addons/web/controllers/main.py
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2013-03-06 16:21:29 +0100
committerFabien Meghazi <fme@openerp.com>2013-03-06 16:21:29 +0100
commitc41aa09d92796e7e84e0fd892c7bb532af58e683 (patch)
treec64f4e35b8563771a81c25bb508f5bd233e203d7 /addons/web/controllers/main.py
parent28aa304d44368d666a64dcce4e032c48211e46ee (diff)
[FIX] Restore cookie_db check
bzr revid: fme@openerp.com-20130306152129-945co8a1gljz95eu
Diffstat (limited to 'addons/web/controllers/main.py')
-rw-r--r--addons/web/controllers/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index bc859f10687..b324e5a18cf 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -109,7 +109,9 @@ def db_monodb_redirect(req):
dbs = []
# 2 use the database from the cookie if it's listable and still listed
- db = req.httprequest.cookies.get('last_used_database') or False
+ cookie_db = req.httprequest.cookies.get('last_used_database')
+ if cookie_db in dbs:
+ db = cookie_db
# 3 use the first db
if dbs and not db: