[FIX] web: traceback on accessing home page
before this commit, after running an older version, lets say odoo 14 and trying to access 16 in the same browser return traceback without redirecting to db selector page and this happens due to the missing env in request, which returns as None. after this commit, no traceback wont be shown and will open the db selector page closes odoo/odoo#118851 X-original-commit: 900303c18243e3b97414b3dbf5eb7ee5b8c9c080 Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
This commit is contained in:
committed by
Julien Castiaux
parent
800223ae7c
commit
bcb245e749
@@ -29,7 +29,7 @@ class Home(http.Controller):
|
||||
|
||||
@http.route('/', type='http', auth="none")
|
||||
def index(self, s_action=None, db=None, **kw):
|
||||
if request.session.uid and not is_user_internal(request.session.uid):
|
||||
if request.db and request.session.uid and not is_user_internal(request.session.uid):
|
||||
return request.redirect_query('/web/login_successful', query=request.params)
|
||||
return request.redirect_query('/web', query=request.params)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user