Remove the 404 code from post redirect as it will cause the browser to not redirect

This commit is contained in:
Gregoo 2025-01-30 12:42:37 +01:00
parent 4e88b33c1f
commit 6e0c4775d1

View File

@ -138,7 +138,7 @@ def error_404(
post_redirect: str | None = None,
error_name: str = 'error',
**kwargs,
) -> Tuple[str | Response, int]:
) -> Response | Tuple[str | Response, int]:
# Warning
logger.warning('Not found: {error} (path: {path})'.format(
error=str(error),
@ -156,7 +156,7 @@ def error_404(
error=str(error),
error_name=error_name,
**kwargs,
), 404
)
else:
return render_template('404.html', error=str(error)), 404