Skip to content

Commit

Permalink
[hotfix] only apply SQLAlchemy limit where needed
Browse files Browse the repository at this point in the history
Observed issue in dev environment where SQL queries were emitted with
`LIMIT 0`. This fix addresses it.
  • Loading branch information
mistercrunch committed Jun 8, 2017
1 parent d3ace6d commit 85fb4a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@ def get_sqla_query( # sqla
direction = asc if ascending else desc
qry = qry.order_by(direction(col))

qry = qry.limit(row_limit)
if row_limit:
qry = qry.limit(row_limit)

if is_timeseries and \
timeseries_limit and groupby and not time_groupby_inline:
Expand Down

0 comments on commit 85fb4a9

Please sign in to comment.