From de57d6dcfc6d3f9e2e3dc3238660f9ecd76c7673 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 22 Jul 2013 18:58:03 +0000 Subject: [PATCH] fix reuploading frames pandora/archive/views.py --- pandora/archive/views.py | 2 +- static/js/editPanel.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/archive/views.py b/pandora/archive/views.py index ed4406b3..98966399 100644 --- a/pandora/archive/views.py +++ b/pandora/archive/views.py @@ -131,7 +131,7 @@ def upload(request): f = get_object_or_404_json(models.File, oshash=request.POST['id']) if 'frame' in request.FILES: if f.editable(request.user): - f.frames.delete() + f.frames.all().delete() for frame in request.FILES.getlist('frame'): name = frame.name #float required? diff --git a/static/js/editPanel.js b/static/js/editPanel.js index 9c439e37..8a8c7f23 100644 --- a/static/js/editPanel.js +++ b/static/js/editPanel.js @@ -241,9 +241,9 @@ pandora.ui.editPanel = function() { sort: data }, function(result) { edit.clips.forEach(function(clip) { - clip[key] = result.data.clips.indexOf(clip.id); + clip['sort'] = result.data.clips.indexOf(clip.id); }); - edit.clips = Ox.sortBy(edit.clips, key); + edit.clips = Ox.sortBy(edit.clips, 'sort'); updateClips(edit.clips); }); }