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 for #936 #937

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions flask_restful/reqparse.py
Expand Up @@ -122,6 +122,8 @@ def source(self, request):
else:
values = MultiDict()
for l in self.location:
if not request.is_json and l == 'json':

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching the order of these checks is probably more efficient.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Granted, re: your comment on the issue, this may be moot if maintenance has dropped off here, and we may need to look more closely at other options.

continue
value = getattr(request, l, None)
if callable(value):
value = value()
Expand Down