From c54f840eb5e45cb81786cc8069c3e654a94f027e Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 18 Oct 2011 12:07:54 +0200 Subject: [PATCH] [FIX] dispatch allow controllers to be configured at the root of a module // bzr revid: al@openerp.com-20111018100754-eacxikmbo96cvcz8 --- addons/web/common/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index f496c1564a2..e23a0431a7c 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -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]