From 58b762f4d235e6eca92fdfce28e7389437a94107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 8 Nov 2016 16:46:19 +0100 Subject: [PATCH] Prevent crash when an Attract project doesn't have a picture_header --- src/templates/attract/index_anon_left_column.jade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/templates/attract/index_anon_left_column.jade b/src/templates/attract/index_anon_left_column.jade index b05cf45..7611aa8 100644 --- a/src/templates/attract/index_anon_left_column.jade +++ b/src/templates/attract/index_anon_left_column.jade @@ -13,7 +13,9 @@ h3.d-title Projects using Attract .d-projects-item a.d-projects-item-header( href="{{ url_for('attract.shots.perproject.index', project_url=proj.url) }}") + | {% if proj.picture_header %} img(src="{{ proj.picture_header.thumbnail('m', api=api) }}") + | {% endif %} a.d-projects-item-title( href="{{ url_for('attract.shots.perproject.index', project_url=proj.url) }}") | {{ proj.name }}