Browse Source

fix (#487)

FIxed error: threshold comparsion between str and float #486
pull/1/head
Evgeny Smyshlyaev 6 years ago committed by GitHub
parent
commit
70953bcc9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      analytics/analytics/detectors/threshold_detector.py

2
analytics/analytics/detectors/threshold_detector.py

@ -43,7 +43,7 @@ class ThresholdDetector(Detector):
else: else:
last_entry = dataframe_without_nans.iloc[-1] last_entry = dataframe_without_nans.iloc[-1]
last_time = convert_pd_timestamp_to_ms(last_entry['timestamp']) 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 } } segment = { 'from': last_time, 'to': last_time, 'params': { value: last_value } }
if condition == '>': if condition == '>':

Loading…
Cancel
Save