X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/82fa12952975d2857e2eb02d66a7f133fd4d5e2e..941ff3d02aa4e8566863b0f06730186761710c13:/wolnelektury/templates/catalogue/book_short.html

diff --git a/wolnelektury/templates/catalogue/book_short.html b/wolnelektury/templates/catalogue/book_short.html
index 7f93a592b..41d3212f3 100644
--- a/wolnelektury/templates/catalogue/book_short.html
+++ b/wolnelektury/templates/catalogue/book_short.html
@@ -2,14 +2,16 @@
     <div class="change-sets">
         <a href="{% url catalogue.views.book_sets book.slug %}" class="jqm-trigger">Na półkę!</a>
     </div>
-    {% if book.children %}
+    {% if book.children.all|length %}
         <div class="book-parent-thumbnail"></div>
     {% else %}
         <div class="book-thumbnail"></div>
     {% endif %}
     <div class="book-description">
         <h2><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></h2>
-        <p style="margin: 0">Na skróty: {{ formats|join:", "|safe }}</p>
+        {% if formats %}
+            <p style="margin: 0">Na skróty: {{ formats|join:", "|safe }}</p>
+        {% endif %}
         <p style="margin: 0">Utwór w kategoriach: {{ tags|join:", "|safe }}</p>
     </div>
 </div>