From 0b723f3fc95d1b5fa5d09434baf0cdff854f242f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 27 Sep 2016 15:56:08 +0200 Subject: [PATCH] Order shots by their cut-in timestamp. --- attract/shots/routes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/attract/shots/routes.py b/attract/shots/routes.py index c4155da..6caa83a 100644 --- a/attract/shots/routes.py +++ b/attract/shots/routes.py @@ -42,7 +42,11 @@ def for_project(project, attract_props, task_id=None, shot_id=None): 'where': { 'project': project['_id'], 'node_type': node_type_shot['name'], - }}, api=api) + }, + 'sort': [ + ('properties.cut_in_timeline_in_frames', 1), + ] + }, api=api) shots = found['_items'] tasks_for_shots = current_attract.shot_manager.tasks_for_shots( @@ -66,7 +70,6 @@ def for_project(project, attract_props, task_id=None, shot_id=None): @perproject_blueprint.route('/') @attract_project_view(extension_props=True) def view_shot(project, attract_props, shot_id): - if not request.is_xhr: return for_project(project, attract_props, shot_id=shot_id)