From 7588e81f710a00ab1ac8240d4f2f748ce706f26d Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 22 Jul 2013 07:30:27 +0000 Subject: [PATCH] allow reuploading frames, #849 --- pandora/archive/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index 7a22d7ad2..ed4406b36 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -130,7 +130,8 @@ def upload(request): response = json_response({}) f = get_object_or_404_json(models.File, oshash=request.POST['id']) if 'frame' in request.FILES: - if f.frames.count() == 0: + if f.editable(request.user): + f.frames.delete() for frame in request.FILES.getlist('frame'): name = frame.name #float required? @@ -143,8 +144,6 @@ def upload(request): f.item.select_frame() f.item.save() item.tasks.update_poster.delay(f.item.itemId) - else: - response = json_response(status=403, text='permissino denied') if 'file' in request.FILES: if not f.available: if f.data: