Use FormCache

This commit is contained in:
richard-dds
2018-11-16 11:38:58 -05:00
parent cd4a5df2d6
commit 6177f46587
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,6 @@ from atst.domain.invitations import (
ExpiredError as InvitationExpiredError,
WrongUserError as InvitationWrongUserError,
)
from atst.utils.form_cache import cache_form_data
def log_error(e):
@@ -40,7 +39,7 @@ def make_error_pages(app):
log_error(e)
url_args = {"sessionExpired": True, "next": request.path}
if request.method == "POST":
url_args["formCache"] = cache_form_data(app.redis, request.form)
url_args["formCache"] = app.form_cache.write(request.form)
return redirect(url_for("atst.root", **url_args))
@app.errorhandler(Exception)