simplify redirect logic in event.py

This commit is contained in:
Lendemor 2025-01-15 14:42:54 +01:00
parent 62916ac6a1
commit 67977ffc05

View File

@ -792,7 +792,7 @@ def server_side(name: str, sig: inspect.Signature, **kwargs) -> EventSpec:
def redirect( def redirect(
path: str | Var[str], path: str | Var[str],
is_external: Optional[bool] = None, is_external: bool = False,
replace: bool = False, replace: bool = False,
) -> EventSpec: ) -> EventSpec:
"""Redirect to a new path. """Redirect to a new path.
@ -809,7 +809,7 @@ def redirect(
"_redirect", "_redirect",
get_fn_signature(redirect), get_fn_signature(redirect),
path=path, path=path,
external=False if is_external is None else is_external, external=is_external,
replace=replace, replace=replace,
) )