From 2d8a3f24dcbd78878cd503d35885d69c41f56d37 Mon Sep 17 00:00:00 2001 From: j Date: Sat, 29 Aug 2020 23:54:19 +0200 Subject: [PATCH] can see > direct upload --- pandora/archive/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index 4f9ead25..56080815 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -483,11 +483,6 @@ class File(models.Model): user.is_staff or \ self.item.user == user or \ self.item.groups.filter(id__in=user.groups.all()).count() > 0 - if not can_see_media: - if 'instances' in data: - data['instances'] = [] - if 'path' in data: - data['path'] = os.path.basename(data['path']) if 'instances' in data and 'filename' in self.info and self.data: data['instances'].append({ 'ignore': False, @@ -495,6 +490,11 @@ class File(models.Model): 'user': self.item.user.username if self.item and self.item.user else 'system', 'volume': 'Direct Upload' }) + if not can_see_media: + if 'instances' in data: + data['instances'] = [] + if 'path' in data: + data['path'] = os.path.basename(data['path']) return data def all_paths(self):