[FIX] website: fix controller / to avoid loop
Don't redirect to '' to avoid infinite redirect loop.
This commit is contained in:
@@ -75,7 +75,7 @@ class Website(Home):
|
||||
else:
|
||||
top_menu = request.website.menu_id
|
||||
first_menu = top_menu and top_menu.child_id and top_menu.child_id.filtered(lambda menu: menu.is_visible)
|
||||
if first_menu and first_menu[0].url != '/' and (not (first_menu[0].url.startswith(('/?', '/#')))):
|
||||
if first_menu and first_menu[0].url not in ('/', '') and (not (first_menu[0].url.startswith(('/?', '/#', ' ')))):
|
||||
return request.redirect(first_menu[0].url)
|
||||
|
||||
raise request.not_found()
|
||||
|
||||
Reference in New Issue
Block a user