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]