From f8ba4ed48f93a9812efd51188e3a8f4d04cfa82e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 5 Feb 2014 13:30:54 +0000 Subject: [PATCH] dont try to sort smart lists. --- pandora/edit/views.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pandora/edit/views.py b/pandora/edit/views.py index b1d97334..5d51f6c2 100644 --- a/pandora/edit/views.py +++ b/pandora/edit/views.py @@ -142,11 +142,14 @@ def orderClips(request): response = json_response() ids = map(ox.fromAZ, data['ids']) if edit.editable(request.user): - index = 0 - with transaction.commit_on_success(): - for i in ids: - models.Clip.objects.filter(edit=edit, id=i).update(index=index) - index += 1 + if edit.type == 'static': + index = 0 + with transaction.commit_on_success(): + for i in ids: + models.Clip.objects.filter(edit=edit, id=i).update(index=index) + index += 1 + else: + response = json_response(status=500, text='sorting smart lists not possible') else: response = json_response(status=403, text='permission denied') return render_to_json_response(response)