[FIX] dispatch allow controllers to be configured at the root of a module /<module...
authorAntony Lesuisse <al@openerp.com>
Tue, 18 Oct 2011 10:07:54 +0000 (12:07 +0200)
committerAntony Lesuisse <al@openerp.com>
Tue, 18 Oct 2011 10:07:54 +0000 (12:07 +0200)
bzr revid: al@openerp.com-20111018100754-eacxikmbo96cvcz8

addons/web/common/http.py

index f496c15..e23a043 100644 (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]