[FIX] Fix loop when parse hash into get param with no hash
bzr revid: jke@openerp.com-20140227130705-jlvl157aio3o4df3
This commit is contained in:
parent
e28677f727
commit
49a92c376a
|
@ -15,6 +15,7 @@ from openerp.tools.translate import _
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
# helpers
|
# helpers
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
|
@ -30,11 +31,15 @@ def fragment_to_query_string(func):
|
||||||
var s = l.search ? (l.search === '?' ? '' : '&') : '?';
|
var s = l.search ? (l.search === '?' ? '' : '&') : '?';
|
||||||
r = l.pathname + l.search + s + q;
|
r = l.pathname + l.search + s + q;
|
||||||
}
|
}
|
||||||
|
if (r == l) {
|
||||||
|
r = '/';
|
||||||
|
}
|
||||||
window.location = r;
|
window.location = r;
|
||||||
</script></head><body></body></html>"""
|
</script></head><body></body></html>"""
|
||||||
return func(self, *a, **kw)
|
return func(self, *a, **kw)
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
# Controller
|
# Controller
|
||||||
#----------------------------------------------------------
|
#----------------------------------------------------------
|
||||||
|
@ -88,6 +93,7 @@ class OAuthLogin(openerp.addons.web.controllers.main.Home):
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
class OAuthController(http.Controller):
|
class OAuthController(http.Controller):
|
||||||
|
|
||||||
@http.route('/auth_oauth/signin', type='http', auth='none')
|
@http.route('/auth_oauth/signin', type='http', auth='none')
|
||||||
|
|
Loading…
Reference in New Issue