Fix stack thrown on page refresh after clean db

This commit is contained in:
Andrew 2022-04-17 13:33:45 -04:00
parent 77bbde149a
commit 3c666e5702

View File

@ -32,14 +32,18 @@ class PublicHandler(BaseHandler):
error = bleach.clean(self.get_argument("error", "Invalid Login!")) error = bleach.clean(self.get_argument("error", "Invalid Login!"))
error_msg = bleach.clean(self.get_argument("error_msg", "")) error_msg = bleach.clean(self.get_argument("error_msg", ""))
try:
page_data = { page_data = {
"version": self.helper.get_version_string(), "version": self.helper.get_version_string(),
"error": error, "error": error,
"lang": self.helper.get_setting("language"), "lang": self.helper.get_setting("language"),
"lang_page": self.helper.get_lang_page(self.helper.get_setting("language")), "lang_page": self.helper.get_lang_page(
"query": "", self.helper.get_setting("language")
} ),
"query": "",
}
except:
self.redirect("/public/login.html")
if self.request.query: if self.request.query:
page_data["query"] = self.request.query page_data["query"] = self.request.query