[FIX] case where Root's dispatcher finds a non-exposed method
Using elif, if a method was found but not exposed (because internal/whatever) the controller's index method would be skipped during URL dispatch leading to a 404. Since matched method yields an early return, a simple if will work, and will *not* skip case where ``method and not method.exposed`` bzr revid: xmo@openerp.com-20130507081611-t2bfba2ai79xj1ew
This commit is contained in:
parent
3baa897ec2
commit
7743760a4f
|
@ -614,7 +614,7 @@ class Root(object):
|
|||
elif exposed == 'http':
|
||||
_logger.debug("Dispatch http to %s %s %s", ps, c, method_name)
|
||||
return lambda request: HttpRequest(request).dispatch(method)
|
||||
elif method_name != "index":
|
||||
if method_name != "index":
|
||||
method_name = "index"
|
||||
continue
|
||||
ps, _slash, method_name = ps.rpartition('/')
|
||||
|
|
Loading…
Reference in New Issue