[FIX]auth_oauth: controller signin fallback to ?db=dbname if xml_id missing (thus, include case where auth_oauth is not installed)
bzr revid: dle@openerp.com-20130607144849-k1u7ac49q8duqulo
This commit is contained in:
parent
27db64f7a0
commit
1204425a83
|
@ -102,7 +102,10 @@ class OAuthController(oeweb.Controller):
|
|||
registry = RegistryManager.get(dbname)
|
||||
with registry.cursor() as cr:
|
||||
IMD = registry['ir.model.data']
|
||||
model, provider_id = IMD.get_object_reference(cr, SUPERUSER_ID, 'auth_oauth', 'provider_openerp')
|
||||
try:
|
||||
model, provider_id = IMD.get_object_reference(cr, SUPERUSER_ID, 'auth_oauth', 'provider_openerp')
|
||||
except ValueError:
|
||||
return set_cookie_and_redirect(req, '/?db=%s' % dbname)
|
||||
assert model == 'auth.oauth.provider'
|
||||
|
||||
state = {
|
||||
|
|
Loading…
Reference in New Issue