Skip to content

Commit 96746e1

Browse files
committed
fix edge case with automatic inputs
1 parent 2d3058a commit 96746e1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/view/_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ def finalize(routes: list[Route], app: ViewApp):
421421
virtual_routes[route.path or ""] = [route]
422422

423423
sig = inspect.signature(route.func)
424+
route.inputs = [i for i in reversed(route.inputs)]
424425
if len(sig.parameters) != len(route.inputs):
425426
names = [i.name for i in route.inputs]
426427
for k, v in sig.parameters.items():
@@ -443,7 +444,6 @@ def finalize(routes: list[Route], app: ViewApp):
443444
)
444445
)
445446
app.loaded_routes.append(route)
446-
route.inputs = [i for i in reversed(route.inputs)]
447447
target(
448448
route.path, # type: ignore
449449
route.func,

0 commit comments

Comments
 (0)