From 07fc49aac01473cbd1534eef21a5ea15b001674b Mon Sep 17 00:00:00 2001 From: Michelle Thomas Date: Fri, 11 May 2018 14:24:23 -0700 Subject: [PATCH] Allowing sqlExpression to be blank --- superset/assets/src/explore/AdhocFilter.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/assets/src/explore/AdhocFilter.js b/superset/assets/src/explore/AdhocFilter.js index 0c84ef55a96c6..ba9651528c3d7 100644 --- a/superset/assets/src/explore/AdhocFilter.js +++ b/superset/assets/src/explore/AdhocFilter.js @@ -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;