Skip to content

Commit

Permalink
Merge pull request #4991 from michellethomas/fix_filter_blank_custom_sql
Browse files Browse the repository at this point in the history
[Bugfix] Allowing sqlExpression to be blank
  • Loading branch information
timifasubaa authored May 14, 2018
2 parents 2c5200a + ad4912d commit 071c6a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/assets/src/explore/AdhocFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export default class AdhocFilter {
this.clause = adhocFilter.clause;
this.sqlExpression = null;
} else if (this.expressionType === EXPRESSION_TYPES.SQL) {
this.sqlExpression = adhocFilter.sqlExpression ||
this.sqlExpression = typeof adhocFilter.sqlExpression === 'string' ?
adhocFilter.sqlExpression :
translateToSql(adhocFilter, { useSimple: true });
this.clause = adhocFilter.clause;
this.subject = null;
Expand Down

0 comments on commit 071c6a6

Please sign in to comment.