Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rename incorrect keyword argument to parse_query_string #449

Closed
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/webargs/falconparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
status_map = {422: HTTP_422}


FALCON_VERSION = falcon.__version__[0]


dodumosu marked this conversation as resolved.
Show resolved Hide resolved
# Collect all exceptions from falcon.status_codes
def _find_exceptions():
for name in filter(lambda n: n.startswith("HTTP"), dir(falcon.status_codes)):
Expand Down Expand Up @@ -65,9 +68,15 @@ def parse_form_body(req):
"will be ignored."
)

if FALCON_VERSION == "1":
key = "keep_blank_qs_values"
elif FALCON_VERSION == "2":
key = "keep_blank"
kwargs = {key: req.options.keep_blank_qs_values}
dodumosu marked this conversation as resolved.
Show resolved Hide resolved
dodumosu marked this conversation as resolved.
Show resolved Hide resolved

if body:
return parse_query_string(
body, keep_blank_qs_values=req.options.keep_blank_qs_values
body, **kwargs
)
return {}
dodumosu marked this conversation as resolved.
Show resolved Hide resolved

Expand Down