[FIX] dispatch allow controllers to be configured at the root of a module /<module>/<method>

bzr revid: al@openerp.com-20111018100754-eacxikmbo96cvcz8
This commit is contained in:
Antony Lesuisse 2011-10-18 12:07:54 +02:00
parent 2e72740353
commit c54f840eb5
1 changed files with 2 additions and 2 deletions

View File

@ -467,8 +467,8 @@ class Root(object):
:returns: a callable matching the path sections, or ``None``
:rtype: ``Controller | None``
"""
if len(l) > 1:
for i in range(len(l), 1, -1):
if len(l):
for i in range(len(l), 0, -1):
ps = "/" + "/".join(l[0:i])
if ps in controllers_path:
c = controllers_path[ps]