Skip to content

Commit

Permalink
[hotfix] groupby may be a set
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Nov 4, 2016
1 parent 5882c7e commit 3b9f7cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1951,9 +1951,10 @@ def recursive_get_fields(_conf):
client.timeseries(**qry)
if len(groupby) == 1:
if not timeseries_limit:
timeseries_limit = 10000
timeseries_limit = 1000

qry['threshold'] = timeseries_limit
qry['dimension'] = qry.get('dimensions')[0]
qry['dimension'] = list(qry.get('dimensions'))[0]
del qry['dimensions']
qry['metric'] = list(qry['aggregations'].keys())[0]
client.topn(**qry)
Expand Down

0 comments on commit 3b9f7cb

Please sign in to comment.