forked from 0x2620/pandora
dont fail if item has no user
This commit is contained in:
parent
c49cc47c3d
commit
fba62c15f4
1 changed files with 2 additions and 1 deletions
|
@ -577,7 +577,8 @@ class Item(models.Model):
|
|||
save(i,
|
||||
'\n'.join([f.path for f in self.files.all()]))
|
||||
elif i == 'user':
|
||||
save(i, self.user.username)
|
||||
if self.user:
|
||||
save(i, self.user.username)
|
||||
elif key['id'] == 'annotations':
|
||||
qs = Annotation.objects.filter(item=self)
|
||||
qs = qs.filter(layer__in=Annotation.public_layers())
|
||||
|
|
Loading…
Reference in a new issue