Skip to content

Commit

Permalink
floats in json
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Obermayer committed Oct 14, 2019
1 parent 17d5e8a commit 1d03aa3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scelvis/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ def update_filter_cells_controls(pathname, attribute, filters_json):
range_min = values.min()
range_max = values.max()
if attribute in filters:
val_min = float(filters[attribute][0])
val_max = float(filters[attribute][1])
val_min = filters[attribute][0]
val_max = filters[attribute][1]
else:
val_min = range_min
val_max = range_max
Expand Down Expand Up @@ -601,7 +601,7 @@ def update_filter_cells_filters(
if not pd.api.types.is_numeric_dtype(values):
filters[attribute] = sorted(cat_value)
else:
filters[attribute] = ["{0:g}".format(v) for v in range_value]
filters[attribute] = range_value

status += ", ".join(attributes)
return (json.dumps(filters), status, status)
Expand Down Expand Up @@ -632,8 +632,8 @@ def activate_filter_cells_reset(pathname, filters_json):
else:
range_min = values.min()
range_max = values.max()
val_min = float(filters[attribute][0])
val_max = float(filters[attribute][1])
val_min = filters[attribute][0]
val_max = filters[attribute][1]
if val_min > range_min or val_max < range_max:
disabled = False

Expand Down

0 comments on commit 1d03aa3

Please sign in to comment.