Skip to content

Commit

Permalink
Fix ignored SQL where clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
skje authored and mistercrunch committed Apr 4, 2016
1 parent 2b31ab4 commit 9c1af66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ def query( # sqla
having_clause_and += [text(extras['having'])]
if granularity:
qry = qry.where(and_(*(time_filter + where_clause_and)))
else:
qry = qry.where(and_(*where_clause_and))
qry = qry.having(and_(*having_clause_and))
if groupby:
qry = qry.order_by(desc(main_metric_expr))
Expand Down

0 comments on commit 9c1af66

Please sign in to comment.