Index: sitescripts/logs/template/subscription.html |
=================================================================== |
--- a/sitescripts/logs/template/subscription.html |
+++ b/sitescripts/logs/template/subscription.html |
@@ -43,19 +43,20 @@ |
<td>Month {{month|monthname}} (<a href="{{overviewURL}}">To overview page</a>)</td> |
</tr> |
</table> |
<div class="block_title">Days of month</div> |
<div class="block"> |
<table align="center" style="margin-bottom: 20px;"> |
<tr align="bottom"> |
- {%- set maxHits, maxBandwidth = day|max(attribute='hits'), day|max(attribute='bandwidth') %} |
- {%- set totalHits = day|sum(attribute='hits') %} |
- {%- set totalBandwidth = day|sum(attribute='bandwidth') %} |
+ {%- set maxHits = day|max(attribute='hits')|ensuremin(1) %} |
+ {%- set maxBandwidth = day|max(attribute='bandwidth')|ensuremin(1) %} |
+ {%- set totalHits = day|sum(attribute='hits')|ensuremin(1) %} |
+ {%- set totalBandwidth = day|sum(attribute='bandwidth')|ensuremin(1) %} |
{%- set dayCount = day|length %} |
{%- if currentMonth and dayCount > 1 %} |
{%- set totalHits = totalHits - day[-1].hits %} |
{%- set totalBandwidth = totalBandwidth - day[-1].bandwidth %} |
{%- set dayCount = dayCount - 1 %} |
{%- endif %} |
{%- for info in day %} |
<td align="center" style="vertical-align: bottom;"> |