is_anonymous
This commit is contained in:
parent
a22cf8979f
commit
9f5e58b0c9
1 changed files with 4 additions and 1 deletions
|
@ -134,5 +134,8 @@ class ListManager(Manager):
|
||||||
if conditions:
|
if conditions:
|
||||||
qs = qs.filter(conditions)
|
qs = qs.filter(conditions)
|
||||||
|
|
||||||
qs = qs.filter(Q(status='public') | Q(status='featured') | Q(user=user))
|
if user.is_anonymous:
|
||||||
|
qs = qs.filter(Q(status='public') | Q(status='featured'))
|
||||||
|
else:
|
||||||
|
qs = qs.filter(Q(status='public') | Q(status='featured') | Q(user=user))
|
||||||
return qs
|
return qs
|
||||||
|
|
Loading…
Reference in a new issue