Fixed statistic view date bug

This commit is contained in:
Kiselev Igor 2021-05-13 17:51:28 +03:00
parent 58717022c5
commit 5f88a4f297
2 changed files with 5 additions and 0 deletions

View File

@ -88,7 +88,11 @@
<tr>
<td scope="col">&nbsp;</td>
{% for date in log_stats.keys %}
{% if interval == 'days' %}
<td scope="col">{{ date | date:'d.m' }}</td>
{% else %}
<td scope="col">{{ date }}</td>
{% endif %}
{% endfor %}
</tr>
</thead>

View File

@ -381,6 +381,7 @@ def statistic_page(request: WSGIRequest) -> HttpResponse:
context['errors'] = data.errors
if data.warnings:
context['warnings'] = data.warnings
context['interval'] = data.interval
context['log_stats'] = stats if not context['errors'] else None
elif request.method == 'GET':
form = StatisticForm()