aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/views/upload.py4
1 files changed, 4 insertions, 0 deletions
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))