user
This commit is contained in:
parent
d75f94ffcb
commit
5de40bdfdd
2 changed files with 2 additions and 2 deletions
|
|
@ -435,7 +435,7 @@ class File(models.Model):
|
|||
if k not in keys:
|
||||
del data[k]
|
||||
can_see_media = False
|
||||
if not user.is_anonymous():
|
||||
if user and not user.is_anonymous():
|
||||
can_see_media = user.profile.capability('canSeeMedia') or \
|
||||
user.is_staff or \
|
||||
self.item.user == user or \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue