X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/blobdiff_plain/731f87ca567597759fe7935f5e3cf42b8e7c3c03..32d339dfffa7356a9d1aad0fbec62d400e86ba8f:/wradmin/controllers/rodelbahn.py diff --git a/wradmin/controllers/rodelbahn.py b/wradmin/controllers/rodelbahn.py index 0b166fe..f6bd26d 100644 --- a/wradmin/controllers/rodelbahn.py +++ b/wradmin/controllers/rodelbahn.py @@ -64,3 +64,15 @@ class RodelbahnController: flash(str(e), 'error') # Redirect to result page return redirect(url_for('rodelbahn_list')) + + def update_mapcache(self): + """Updates the wrmappointcache and wrmappathcache tables from the wiki.""" + c = model.meta.Session.connection() + try: + wrpylib.wrmwcache.update_wrmapcache(c) + model.meta.Session.commit() + flash('Die Landkarteninformationen aus dem Wiki wurden erfolgreich aktualisiesrt.', 'info') + except wrpylib.wrmwcache.UpdateCacheError as e: + flash(str(e), 'error') + # Redirect to result page + return redirect(url_for('rodelbahn_list'))