From aa40c39a812922aef3eb914e13471165ae0279bd Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 23 Oct 2011 14:07:29 +0200 Subject: [PATCH] dont change path if there are no instances left --- pandora/archive/models.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 97d9cc75..a0d49766 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -323,13 +323,7 @@ class File(models.Model): instance = self.get_instance() if instance: return instance.path - if self.item: - name = self.item.get('title', 'Untitled') - name = re.sub(r'[:\\/]', '_', name) - if not name: - name = 'Untitled' - ext = '.unknown' - return name + ext + return self.path def delete_file(sender, **kwargs): f = kwargs['instance']