From 15d5ac687cc58bdc58e3e2f3c188e934cd104a40 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 19 Apr 2019 15:30:55 +0200 Subject: [PATCH] Attach all project pictures when viewing node The Open Graph rendering code is not completely refactored yet, so it still requires a mix of project.picture_header and project.picture_16_9. By attaching all project pictures we prevent unexpected errors. --- pillar/web/projects/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pillar/web/projects/routes.py b/pillar/web/projects/routes.py index 3b4c1815..3fc33387 100644 --- a/pillar/web/projects/routes.py +++ b/pillar/web/projects/routes.py @@ -491,9 +491,9 @@ def view_node(project_url, node_id): extension_sidebar_links = '' og_picture = node.picture = utils.get_file(node.picture, api=api) if project: + utils.attach_project_pictures(project, api) if not node.picture: - og_picture = utils.get_file(project.picture_16_9, api=api) - project.picture_square = utils.get_file(project.picture_square, api=api) + og_picture = project.picture_16_9 navigation_links = project_navigation_links(project, api) extension_sidebar_links = current_app.extension_sidebar_links(project)