MapAdapter.build does not flatten list value from plain dict#2307
Merged
MapAdapter.build does not flatten list value from plain dict#2307
MapAdapter.build does not flatten list value from plain dict#2307Conversation
3 tasks
6bf8212 to
6bcc85a
Compare
6bcc85a to
206d24a
Compare
Contributor
|
🎉 Yeah! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It should be possible to pass a list value to a custom URL converter when building. However, after some other changes to the code to support
MultiDict, a regression was introduced that made that difficult.This changes the behavior so flattening single-item lists only happens when passing
MultiDict, where values will always be lists, and are mainly coming fromrequest.argswhere this behavior makes sense. For plain dicts, neither of these things are done, it is assumed that the user will intentionally pass a list or single item depending on what's appropriate.Additionally,
buildno longer filtersNoneitems from list values. Either the list will be passed to a URL converter, where it's the converter's job to handle the value passed to it, or it's a query arg, andurl_encodealready filters outNone.fixes #2249
continues #2261