[FIX] website: avoid divisions by zero when no record to display

This commit is contained in:
Martin Trigaux 2014-07-02 16:25:24 +02:00
parent 376cdf36b4
commit a6bf8cd07b
1 changed files with 1 additions and 1 deletions

View File

@ -411,7 +411,7 @@
<table class="table js_kanban">
<thead>
<tr>
<t t-set="width" t-value="str(round(100.0 / len(objects), 2)) + '%'"/>
<t t-set="width" t-value="str(round(100.0 / (len(objects) if objects else 1), 2)) + '%'"/>
<t t-foreach="objects">
<th t-att-width="width">
<div t-field="column_id.name" class="text-center"></div>