fix: add dummy data functiong

feature/reliability_stat
Cizz22 7 months ago
parent d141149d2f
commit e61508ec1d

@ -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

Loading…
Cancel
Save