From 02a5113bdd2fd41c82ac11e98ba4d697f018091a Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Wed, 17 Jul 2019 15:55:54 +1200 Subject: [PATCH] Fix admin logout login button redirection If you clicked on logout in the admin site then clicked on the "Login" button and logged in, you were redirected to the logout page because we weren't detecting that the redirection should not be applied. Signed-off-by: Paul Eggleton --- layerindex/context_processors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layerindex/context_processors.py b/layerindex/context_processors.py index 0167a80..3352e63 100644 --- a/layerindex/context_processors.py +++ b/layerindex/context_processors.py @@ -16,7 +16,7 @@ def layerindex_context(request): site_name = site.name else: site_name = 'OpenEmbedded Layer Index' - if request.path.startswith('/accounts'): + if request.path.startswith('/accounts') or request.path.startswith('/admin/logout'): login_return_url = '' else: login_return_url = request.path