Use FormCache
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user