Skip to content

Commit

Permalink
corrige la valeur de l'user
Browse files Browse the repository at this point in the history
  • Loading branch information
dralliw committed Jul 4, 2014
1 parent 9360a94 commit a6bf61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zds/utils/templatetags/topbar.py
Expand Up @@ -15,10 +15,10 @@ def top_categories(user):
cats = {}

forums_pub = Forum.objects.filter(group__isnull=True).select_related("category").all()
if user.is_authenticated():
if user and user.is_authenticated():
forums_prv = Forum\
.objects\
.filter(group__isnull=False, group__in=u.groups.all())\
.filter(group__isnull=False, group__in=user.groups.all())\
.select_related("category").all()
forums = list(forums_pub|forums_prv)
else :
Expand Down

0 comments on commit a6bf61a

Please sign in to comment.