mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
cleanup: remove int(...) casts on HTTPStatus usage
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
56eefabc6d
commit
6ddf888b67
7 changed files with 66 additions and 66 deletions
|
@ -139,7 +139,7 @@ def render_template(request: Request,
|
|||
status_code: HTTPStatus = HTTPStatus.OK):
|
||||
""" Render a template as an HTMLResponse. """
|
||||
rendered = render_raw_template(request, path, context)
|
||||
response = HTMLResponse(rendered, status_code=status_code)
|
||||
response = HTMLResponse(rendered, status_code=int(status_code))
|
||||
secure_cookies = aurweb.config.getboolean("options", "disable_http_login")
|
||||
response.set_cookie("AURLANG", context.get("language"),
|
||||
secure=secure_cookies, httponly=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue