From 630ed5bbf334112f7045eac9cdb7b28baa7f4854 Mon Sep 17 00:00:00 2001 From: RamuniN Date: Tue, 17 Oct 2023 15:32:26 +0100 Subject: [PATCH] fix bug in `get_team_flag_stats` function --- app/blueprints/assessments/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/blueprints/assessments/helpers.py b/app/blueprints/assessments/helpers.py index 5578e316..5bfc86d3 100644 --- a/app/blueprints/assessments/helpers.py +++ b/app/blueprints/assessments/helpers.py @@ -46,11 +46,11 @@ def create_team_dict(team_name): for team in team_flag_stats: if team["team_name"] == allocated_team: - if latest_status == FlagType.RAISED: + if latest_status == FlagType.RAISED.value: team["raised"] += 1 - elif latest_status == FlagType.STOPPED: + elif latest_status == FlagType.STOPPED.value: team["stopped"] += 1 - elif latest_status == FlagType.RESOLVED: + elif latest_status == FlagType.RESOLVED.value: team["resolved"] += 1 return team_flag_stats