Photo album improvements
[sommitrealweird.git] / sommitrealweird / photo / templates / photo / album_index.html
index edfbc9ff3f58f1e92b03a616e0fe010a25034964..402deedfc0ab4d246474ec49b2b218f91a0965f1 100644 (file)
@@ -6,7 +6,9 @@
     {% if object_list %}
         {% for album in object_list %}
             <div class="album">
+                {% if album.get_main_image %}
                 <a href="{{ album.slug }}/"><img src="{{ album.get_main_image.url|thumbnail:"width=250" }}" alt="{{ album.get_main_image.caption }}" /></a>
+                {% endif %}
                 <h2><a href="{{ album.slug }}/">{{ album.name }}</a></h2>
                 <p>{{ album.caption }}</h2>
             </div>