From e340bbbaf5346b307ef2dd1ed0f8f343f162a22b Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Mon, 1 Nov 2010 11:05:52 -0400 Subject: [PATCH] Minor correction to Waldo logout view to fall back to the node's absolute_url if HTTP_REFERER is not found in request.META --- contrib/waldo/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/waldo/models.py b/contrib/waldo/models.py index e2d70ae..f1ee05a 100644 --- a/contrib/waldo/models.py +++ b/contrib/waldo/models.py @@ -164,7 +164,7 @@ class LoginMultiView(MultiView): login = never_cache(login) def logout(self, request): - return auth_views.logout(request, request.META['HTTP_REFERER']) + return auth_views.logout(request, request.META.get('HTTP_REFERER', request.node.get_absolute_url())) def login_required(self, view): def inner(request, *args, **kwargs): -- 2.20.1