From 6910d3da497ecec8cfe0b2a340f638662a7bd625 Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Thu, 24 Nov 2016 18:14:07 +0100 Subject: [PATCH] We always include the picture now --- pillar/web/projects/routes.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pillar/web/projects/routes.py b/pillar/web/projects/routes.py index 22be9317..4a781d22 100644 --- a/pillar/web/projects/routes.py +++ b/pillar/web/projects/routes.py @@ -251,7 +251,7 @@ def render_project(project, api, extra_context=None, template_name=None): project.picture_square = utils.get_file(project.picture_square, api=api) project.picture_header = utils.get_file(project.picture_header, api=api) - def load_latest(list_of_ids, get_picture=False): + def load_latest(list_of_ids): """Loads a list of IDs in reversed order.""" if not list_of_ids: @@ -259,10 +259,9 @@ def render_project(project, api, extra_context=None, template_name=None): # Construct query parameters outside the loop. projection = {'name': 1, 'user': 1, 'node_type': 1, 'project': 1, - 'properties.url': 1, 'properties.content_type': 1} + 'properties.url': 1, 'properties.content_type': 1, + 'picture': 1} params = {'projection': projection, 'embedded': {'user': 1}} - if get_picture: - projection['picture'] = 1 list_latest = [] for node_id in reversed(list_of_ids or ()):