Formatting fixes.

This commit is contained in:
Jennifer Taylor
2026-08-20 23:57:38 +00:00
parent 019aa39d48
commit 0685ae5d02
3 changed files with 16 additions and 6 deletions

View File

@@ -160,7 +160,9 @@ class BaseData:
"""
# Create a new session that is unique
while True:
session = "".join(random.choice(string.digits + string.ascii_lowercase) for _ in range(BaseData.SESSION_LENGTH))
session = "".join(
random.choice(string.digits + string.ascii_lowercase) for _ in range(BaseData.SESSION_LENGTH)
)
sql = "SELECT session FROM session WHERE session = :session"
cursor = self.execute(sql, {"session": session})
if cursor.rowcount == 0:

View File

@@ -76,10 +76,18 @@ def viewlogin() -> Response:
def recover_display(username: str, token: Optional[str], card_number: Optional[str]) -> Response:
return Response(render_template(
"account/recover.html",
**{"title": "Recover Password", "show_navigation": False, "token": token, "card_number": card_number, "username": username},
))
return Response(
render_template(
"account/recover.html",
**{
"title": "Recover Password",
"show_navigation": False,
"token": token,
"card_number": card_number,
"username": username,
},
)
)
@account_pages.route("/recover", methods=["POST"])

View File

@@ -355,7 +355,7 @@ def navigation() -> Dict[str, Any]:
]
custom_config = {}
if g.config.server.allow_raw_ids:
custom_config['allow_raw_ids'] = True
custom_config["allow_raw_ids"] = True
# Look up the logged in user ID.
try: