-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flags when setting multiple values at once (#248)
We introduced the ability to override the serializer-returned flags values in 26f7c1b. Unfortunately, there was a flaw in that logic which resulted in the first item's flags being used for all later items. This bug primarily affected set_many()'s behavior when the data dictionary contained multiple different value types which were assigned different per-value flags values by the serializer. For example: set_many({'a': 'string', 'b': 10}) If a serializer returned different flags for strings (e.g. 1) and integer values (e.g. 2), the previous logic would have set ``flags`` to 1 the first time through the loop and repeated that value for the second item, instead of using 2. This was the intended behavior when ``flags`` was explicitly passed to set_many(), but not for the default case where we still want to respect the flags values returned by the serializer.
- Loading branch information
Showing
4 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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