Bugfix around empty compare_lag
This commit is contained in:
parent
7137d7597e
commit
179622da77
|
|
@ -75,7 +75,7 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ class BigNumberViz(BaseViz):
|
|||
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue