Prevent crash when an Attract project doesn't have a picture_header

This commit is contained in:
2016-11-08 16:46:19 +01:00
parent 21f3acc03e
commit 58b762f4d2

View File

@@ -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 }}