Skip to content

Commit

Permalink
Don't serialize None to json, so we can use SQL is not null predicate.
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jan 13, 2019
1 parent 8e99194 commit 55cf97e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions redash/models/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class PseudoJSON(TypeDecorator):
impl = db.Text

def process_bind_param(self, value, dialect):
if value is None:
return value

return json_dumps(value)

def process_result_value(self, value, dialect):
Expand Down

0 comments on commit 55cf97e

Please sign in to comment.