[FIX] /web always save the provided db in session

guessed_db is only computed by the /web controller, so even if the provided db
match the guessed_db we should save it in the http session. Because all rpc
call made before the authentication wont compute the guessed_db, so the
request.db will be wrong for those calls.

bzr revid: al@openerp.com-20131110010411-s7ermjwmfbile1ix
This commit is contained in:
Antony Lesuisse 2013-11-10 02:04:11 +01:00
parent c9a7e69a75
commit 14245e24fc
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ class Home(http.Controller):
if db is None and guessed_db is not None:
return redirect(guessed_db)
if db is not None and db != guessed_db:
if db is not None and db != request.session.db:
request.session.logout()
request.session.db = db
guessed_db = db