diff options
| author | Fabien Meghazi <fme@openerp.com> | 2013-03-06 09:59:36 +0100 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2013-03-06 09:59:36 +0100 |
| commit | 28aa304d44368d666a64dcce4e032c48211e46ee (patch) | |
| tree | 211d9ab66a5168df22779886004c9bc2dc4616e9 /addons | |
| parent | 88e0e2933c0e445d082eb8caaac623498562abc3 (diff) | |
[FIX] db_monodb: cookie not used. keep same behavior as previous
bzr revid: fme@openerp.com-20130306085936-3mcyorwtgbb0uk0u
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/controllers/main.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 876f8c8a26d..bc859f10687 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -109,12 +109,10 @@ def db_monodb_redirect(req): dbs = [] # 2 use the database from the cookie if it's listable and still listed - cookie_db = req.httprequest.cookies.get('last_used_database') - if cookie_db in dbs: - db = cookie_db + db = req.httprequest.cookies.get('last_used_database') or False # 3 use the first db - if dbs: + if dbs and not db: db = dbs[0] # redirect to the chosen db if multiple are available |
