mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Fix ignored SQL where clauses
This commit is contained in:
parent
2b31ab498b
commit
9c1af66ba4
@ -575,6 +575,8 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
|
|||||||
having_clause_and += [text(extras['having'])]
|
having_clause_and += [text(extras['having'])]
|
||||||
if granularity:
|
if granularity:
|
||||||
qry = qry.where(and_(*(time_filter + where_clause_and)))
|
qry = qry.where(and_(*(time_filter + where_clause_and)))
|
||||||
|
else:
|
||||||
|
qry = qry.where(and_(*where_clause_and))
|
||||||
qry = qry.having(and_(*having_clause_and))
|
qry = qry.having(and_(*having_clause_and))
|
||||||
if groupby:
|
if groupby:
|
||||||
qry = qry.order_by(desc(main_metric_expr))
|
qry = qry.order_by(desc(main_metric_expr))
|
||||||
|
Loading…
Reference in New Issue
Block a user