From 08513b815501d13970832d1d3c706d53dffc30a1 Mon Sep 17 00:00:00 2001 From: Evgeny Smyshlyaev Date: Tue, 5 Feb 2019 14:40:05 +0300 Subject: [PATCH] Missing segments in result #392 (#393) --- analytics/analytics/detectors/threshold_detector.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analytics/analytics/detectors/threshold_detector.py b/analytics/analytics/detectors/threshold_detector.py index 3f834a7..b3aee5a 100644 --- a/analytics/analytics/detectors/threshold_detector.py +++ b/analytics/analytics/detectors/threshold_detector.py @@ -59,4 +59,5 @@ class ThresholdDetector(Detector): } def recieve_data(self, data: pd.DataFrame, cache: Optional[ModelCache]) -> Optional[dict]: - return self.detect(data, cache) + result = self.detect(data, cache) + return result if result else None