From fba62c15f47b0bc0919416acd450fb1d10683afd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 20 Feb 2012 14:39:30 +0000 Subject: [PATCH] dont fail if item has no user --- pandora/item/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 74ee69d89..ea6fa2ecd 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -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())