From 86c5d711a6fef03a853d4e5c15e30cd38ffd71c4 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 10 Jul 2020 09:09:11 +0300 Subject: [PATCH] Chunk upload: item.uid can never be None so use it directly. --- django_etebase/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/django_etebase/models.py b/django_etebase/models.py index b4b04fc..397600e 100644 --- a/django_etebase/models.py +++ b/django_etebase/models.py @@ -82,8 +82,7 @@ def chunk_directory_path(instance, filename): item = instance.item col = item.collection user_id = col.owner.id - item_uid = item.uid or 'main' - return Path('user_{}'.format(user_id), col.uid, item_uid, instance.uid) + return Path('user_{}'.format(user_id), col.uid, item.uid, instance.uid) class CollectionItemChunk(models.Model):