fix last process updates run view

This commit is contained in:
Laura Klünder 2018-12-16 19:55:17 +01:00
parent 59db4cdd1e
commit 991dedc3ee
2 changed files with 8 additions and 6 deletions

View file

@ -25,11 +25,13 @@
<p>{% trans 'Map updates are currently not processed automatically.' %}</p>
{% endif %}
{% if last_processed %}
{% trans 'Last run:' %}
{% if not last_processed_success %}
<strong class="red">{% trans '(failed)' %}</strong>
{% endif %}
{{ last_processed|date:"SHORT_DATETIME_FORMAT" }}
<p>
{% trans 'Last run:' %}
{% if not last_processed_success %}
<strong class="red">{% trans '(failed)' %}</strong>
{% endif %}
{{ last_processed|date:"SHORT_DATETIME_FORMAT" }}
</p>
{% endif %}
<button type="submit" name="process_updates" value="1">{% trans 'Process map updates now' %}</button>
</form>

View file

@ -392,7 +392,7 @@ def map_updates(request):
last_processed, last_processed_success = cache.get('mapdata:last_process_updates_run', (None, None))
if last_processed:
make_aware(datetime.fromtimestamp(last_processed))
last_processed = make_aware(datetime.fromtimestamp(last_processed))
return render(request, 'control/map_updates.html', {
'last_processed': last_processed,