X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/blobdiff_plain/2a28a5c0c5a7c96a108619dbd4ce6283c7f3f374..32d339dfffa7356a9d1aad0fbec62d400e86ba8f:/wradmin/controllers/rodelbahn.py diff --git a/wradmin/controllers/rodelbahn.py b/wradmin/controllers/rodelbahn.py index 71e633f..f6bd26d 100644 --- a/wradmin/controllers/rodelbahn.py +++ b/wradmin/controllers/rodelbahn.py @@ -43,7 +43,7 @@ class RodelbahnController: flash('Die Rodelbahnliste wurde erfolgreich aktualisiert.', 'info') except wrpylib.wrmwcache.UpdateCacheError as e: title = str(e.args[1]) - title = wrpylib.mwmarkup.to_title(title) + title = wrpylib.mwmarkup.dbkey_to_title(title) msg = str(e.args[2]) msg = msg.replace('\n', '; ') if len(e.args) == 3: @@ -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'))