Skip to content

Commit

Permalink
Bugfix around empty compare_lag
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 13, 2015
1 parent 7137d75 commit 179622d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion panoramix/templates/panoramix/datasource.html
Expand Up @@ -75,7 +75,7 @@ <h4>Filters</h4>
<hr>
<button type="button" class="btn btn-primary druidify">
<i class="fa fa-bolt"></i>
Druidify!
Slice!
</button>
<button type="button" class="btn btn-default" id="save">
<i class="fa fa-save"></i>
Expand Down
2 changes: 1 addition & 1 deletion panoramix/viz.py
Expand Up @@ -391,7 +391,7 @@ def get_json_data(self):
df = df.sort(columns=df.columns[0])
df['timestamp'] = df[[0]].astype(np.int64) // 10**9
compare_lag = form_data.get("compare_lag", "")
compare_lag = int(compare_lag) if compare_lag.isdigit() else 0
compare_lag = int(compare_lag) if compare_lag and compare_lag.isdigit() else 0
d = {
'data': df.values.tolist(),
'compare_lag': compare_lag,
Expand Down

0 comments on commit 179622d

Please sign in to comment.