forked from 0x2620/pandora
dont try to sort smart lists.
This commit is contained in:
parent
b2b2649420
commit
f8ba4ed48f
1 changed files with 8 additions and 5 deletions
|
@ -142,11 +142,14 @@ def orderClips(request):
|
||||||
response = json_response()
|
response = json_response()
|
||||||
ids = map(ox.fromAZ, data['ids'])
|
ids = map(ox.fromAZ, data['ids'])
|
||||||
if edit.editable(request.user):
|
if edit.editable(request.user):
|
||||||
|
if edit.type == 'static':
|
||||||
index = 0
|
index = 0
|
||||||
with transaction.commit_on_success():
|
with transaction.commit_on_success():
|
||||||
for i in ids:
|
for i in ids:
|
||||||
models.Clip.objects.filter(edit=edit, id=i).update(index=index)
|
models.Clip.objects.filter(edit=edit, id=i).update(index=index)
|
||||||
index += 1
|
index += 1
|
||||||
|
else:
|
||||||
|
response = json_response(status=500, text='sorting smart lists not possible')
|
||||||
else:
|
else:
|
||||||
response = json_response(status=403, text='permission denied')
|
response = json_response(status=403, text='permission denied')
|
||||||
return render_to_json_response(response)
|
return render_to_json_response(response)
|
||||||
|
|
Loading…
Reference in a new issue