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 <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2019-07-17 15:55:54 +12:00
parent 483811dc40
commit 02a5113bdd

View File

@ -16,7 +16,7 @@ def layerindex_context(request):
site_name = site.name site_name = site.name
else: else:
site_name = 'OpenEmbedded Layer Index' site_name = 'OpenEmbedded Layer Index'
if request.path.startswith('/accounts'): if request.path.startswith('/accounts') or request.path.startswith('/admin/logout'):
login_return_url = '' login_return_url = ''
else: else:
login_return_url = request.path login_return_url = request.path