Dolda2000 GitWeb
/
wrw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
977d28b
)
Fix keyword-parameter handling bug in formparams.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 3 Nov 2023 23:29:26 +0000
(
00:29
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Fri, 3 Nov 2023 23:29:26 +0000
(
00:29
+0100)
wrw/util.py
patch
|
blob
|
blame
|
history
diff --git
a/wrw/util.py
b/wrw/util.py
index
dcf745a
..
6fa4155
100644
(file)
--- a/
wrw/util.py
+++ b/
wrw/util.py
@@
-25,6
+25,8
@@
def formparams(callable):
if par.name in data:
args[par.name] = data[par.name]
for par in sig.parameters.values():
+ if par.kind is inspect.Parameter.VAR_KEYWORD:
+ continue
if par.default is inspect.Parameter.empty and par.name not in args:
raise resp.httperror(400, "Missing parameter", ("The query parameter `", resp.h.code(par.name), "' is required but not supplied."))
return callable(**args)