From b0ec6ad83681ae7825900fe291de0f157a623574 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 2 Jul 2022 21:35:04 +0200 Subject: ensure the track cache is built after upload --- fietsboek/views/upload.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fietsboek/views/upload.py b/fietsboek/views/upload.py index debd248..f670d52 100644 --- a/fietsboek/views/upload.py +++ b/fietsboek/views/upload.py @@ -162,6 +162,10 @@ def do_finish_upload(request): request.dbsession.delete(upload) request.dbsession.flush() + # Best time to build the cache is right after the upload + track.ensure_cache() + request.dbsession.add(track.cache) + request.session.flash(request.localizer.translate(_("flash.upload_success"))) return HTTPFound(request.route_url('details', id=track.id)) -- cgit v1.2.3