Whoops, make sure we correctly fetch the user to display entries for on the home page if nobody is logged in
This commit is contained in:
parent
f6a0adfb56
commit
b2b017c1bd
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ def index(request, page):
|
||||||
return reverse('home:index', kwargs=kwargs)
|
return reverse('home:index', kwargs=kwargs)
|
||||||
|
|
||||||
user = request.user
|
user = request.user
|
||||||
if not user:
|
if not hasattr(user, 'entries'):
|
||||||
user = get_object_or_404(User, pk=1)
|
user = get_object_or_404(User, pk=1)
|
||||||
|
|
||||||
entries = user.entries.filter(kind__in=kinds.on_home)
|
entries = user.entries.filter(kind__in=kinds.on_home)
|
||||||
|
|
Loading…
Reference in a new issue