27 lines
795 B
Diff
27 lines
795 B
Diff
From ef7b678bda31b9d5c3f7f4cffcdcf14137b4cdad Mon Sep 17 00:00:00 2001
|
|
From: Marcel Hellkamp <marc@gsites.de>
|
|
Date: Sun, 12 Jun 2022 20:54:46 +0200
|
|
Subject: [PATCH] fix: view decorator does not forward default values if route
|
|
result is None
|
|
|
|
---
|
|
bottle.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/bottle.py b/bottle.py
|
|
index 2266801..ed3076c 100644
|
|
--- a/bottle.py
|
|
+++ b/bottle.py
|
|
@@ -3682,7 +3682,7 @@ def view(tpl_name, **defaults):
|
|
tplvars.update(result)
|
|
return template(tpl_name, **tplvars)
|
|
elif result is None:
|
|
- return template(tpl_name, defaults)
|
|
+ return template(tpl_name, **defaults)
|
|
return result
|
|
return wrapper
|
|
return decorator
|
|
--
|
|
2.39.0.windows.2
|
|
|