fix reuploading frames pandora/archive/views.py
This commit is contained in:
parent
09899cd7af
commit
de57d6dcfc
2 changed files with 3 additions and 3 deletions
|
@ -131,7 +131,7 @@ def upload(request):
|
||||||
f = get_object_or_404_json(models.File, oshash=request.POST['id'])
|
f = get_object_or_404_json(models.File, oshash=request.POST['id'])
|
||||||
if 'frame' in request.FILES:
|
if 'frame' in request.FILES:
|
||||||
if f.editable(request.user):
|
if f.editable(request.user):
|
||||||
f.frames.delete()
|
f.frames.all().delete()
|
||||||
for frame in request.FILES.getlist('frame'):
|
for frame in request.FILES.getlist('frame'):
|
||||||
name = frame.name
|
name = frame.name
|
||||||
#float required?
|
#float required?
|
||||||
|
|
|
@ -241,9 +241,9 @@ pandora.ui.editPanel = function() {
|
||||||
sort: data
|
sort: data
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
edit.clips.forEach(function(clip) {
|
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);
|
updateClips(edit.clips);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue