Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1776] Fix bug when upserting [] on JSON column in the datastore
We were testing that the new value wasn't `None` using `if value`. As `[]` is a falsy value, we never went through that `if` and ended up trying to run an invalid SQL query. This commit fixes that by explictly testing `if value is not None`. This was first discovered in http://stackoverflow.com/questions/24207065/inserting-empty-arrays-in-json-type-fields-in-datastore
- Loading branch information
1 parent
baca61b
commit 1fe8df1
Showing
2 changed files
with
30 additions
and
1 deletion.
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