From d71f475f7f6d5b8234abc47cfeff2027c7649f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 29 Apr 2016 12:42:52 +0200 Subject: [PATCH] misc: protect against removed categories (#10773) --- extra/modules/root.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/modules/root.py b/extra/modules/root.py index a70ea26..918332e 100644 --- a/extra/modules/root.py +++ b/extra/modules/root.py @@ -840,7 +840,7 @@ class AlternateRootDirectory(OldRootDirectory): uri_rest += '?' + get_request().get_query() if uri_rest.startswith(base_url): uri_rest = uri_rest[len(base_url):] - if f.category_id: + if f.category: return redirect('%s%s/%s' % (base_url, f.category.url_name, uri_rest)) raise e -- 2.8.1