From b2b017c1bd3fc2fc00ceed510332184092938b29 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 29 Jan 2018 08:48:56 +1100 Subject: [PATCH] Whoops, make sure we correctly fetch the user to display entries for on the home page if nobody is logged in --- home/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/views.py b/home/views.py index eb9b729..86c579b 100644 --- a/home/views.py +++ b/home/views.py @@ -18,7 +18,7 @@ def index(request, page): return reverse('home:index', kwargs=kwargs) user = request.user - if not user: + if not hasattr(user, 'entries'): user = get_object_or_404(User, pk=1) entries = user.entries.filter(kind__in=kinds.on_home)