From 70953bcc9d4776a09440673ad70473423c0670a1 Mon Sep 17 00:00:00 2001 From: Evgeny Smyshlyaev Date: Wed, 27 Mar 2019 20:48:18 +0300 Subject: [PATCH] fix (#487) FIxed error: threshold comparsion between str and float #486 --- analytics/analytics/detectors/threshold_detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analytics/analytics/detectors/threshold_detector.py b/analytics/analytics/detectors/threshold_detector.py index 4c71cc8..dc5320f 100644 --- a/analytics/analytics/detectors/threshold_detector.py +++ b/analytics/analytics/detectors/threshold_detector.py @@ -43,7 +43,7 @@ class ThresholdDetector(Detector): else: last_entry = dataframe_without_nans.iloc[-1] last_time = convert_pd_timestamp_to_ms(last_entry['timestamp']) - last_value = last_entry['value'] + last_value = float(last_entry['value']) segment = { 'from': last_time, 'to': last_time, 'params': { value: last_value } } if condition == '>':