# HG changeset patch # User neko259 # Date 2015-08-11 13:09:03 # Node ID 0c448cb21e021bdd8656a04ba677691308706732 # Parent 219062f3a3a22ecbee73bf3445f398f38f7dea2f Don't show random image for tag that does not have images diff --git a/boards/templates/boards/all_threads.html b/boards/templates/boards/all_threads.html --- a/boards/templates/boards/all_threads.html +++ b/boards/templates/boards/all_threads.html @@ -38,14 +38,16 @@ {% if tag %}
-
- {% with image=random_image_post.images.first %} - - {% endwith %} -
+ {% if random_image_post %} +
+ {% with image=random_image_post.images.first %} + + {% endwith %} +
+ {% endif %}