Remove the 404 code from post redirect as it will cause the browser to not redirect
This commit is contained in:
parent
a832ff27f7
commit
8f5d59394c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user