Fix error handling.
[redakcja.git] / src / documents / templates / documents / book_detail.html
index a2dea02..08d8c36 100644 (file)
   </div>
 
 
-  {% if doc %}
+  {% if stats %}
     <div class="card mt-4">
       <div class="card-header">
         <h2>{% trans "Statistics" %}</h2>
             </tr>
           </thead>
           <tbody>
-            {% with stats=doc.get_statistics %}
-              {% include 'documents/book_stats.html' with book=doc stats=stats depth=0 %}
-          {% endwith %}
+            {% include 'documents/book_stats.html' with book=doc stats=stats depth=0 %}
         </tbody>
       </table>
     </div>