fix reuploading frames pandora/archive/views.py

This commit is contained in:
j 2013-07-22 18:58:03 +00:00
parent 09899cd7af
commit de57d6dcfc
2 changed files with 3 additions and 3 deletions

View file

@ -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?

View file

@ -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);
});
}