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