forked from 0x2620/pandora
is_anonymous
This commit is contained in:
parent
83acfd78fc
commit
d2b0c18001
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