From e61508ec1d4f2b4b34aa79f9dee4e5f6552a954d Mon Sep 17 00:00:00 2001 From: Cizz22 Date: Mon, 30 Jun 2025 11:30:25 +0700 Subject: [PATCH] fix: add dummy data functiong --- src/calculation_time_constrains/service.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/calculation_time_constrains/service.py b/src/calculation_time_constrains/service.py index c8e2d0b..f44480c 100644 --- a/src/calculation_time_constrains/service.py +++ b/src/calculation_time_constrains/service.py @@ -139,11 +139,6 @@ class ReliabilityService: last_day = calendar.monthrange(current.year, current.month)[1] last_day_date = datetime.datetime(current.year, current.month, last_day) - if month_count == 0: - cumulative_failures = 0 - results[last_day_date] = round(cumulative_failures, 3) - month_count += 1 - continue # Stop if we've passed the end_date if last_day_date > end_date: @@ -172,7 +167,7 @@ class ReliabilityService: cumulative_failures += monthly_failures # Store cumulative value rounded to 3 decimal places - results[last_day_date] = round(cumulative_failures, 3) + results[last_day_date] = round(cumulative_failures, 3) if month_count > 0 else 0 # Move to next month month_count += 1