From 0c063f16500a596d123ec3f38c77b714f34ce70b Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 28 May 2013 08:45:07 +0000 Subject: [PATCH] really only put files into item with same folder not same folder prefix --- pandora/archive/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 086d0132..538982d6 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -180,7 +180,7 @@ class File(models.Model): get_name_sort(name, sortname) #add all files in one folder to same item if self.instances.all().count(): - folder = os.path.dirname(self.instances.all()[0].path) + folder = os.path.dirname(self.instances.all()[0].path) + '/' qs = item.models.Item.objects.filter(files__instances__path__startswith=folder) if qs.exists(): self.item = qs[0]