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