From 7e114cd4566a20c3243d8258eab06fc3f3032547 Mon Sep 17 00:00:00 2001 From: TannedCung Date: Fri, 28 Jun 2024 15:40:18 +0700 Subject: [PATCH] Fix: missleading 0 review progress --- cope2n-api/fwd_api/utils/accuracy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cope2n-api/fwd_api/utils/accuracy.py b/cope2n-api/fwd_api/utils/accuracy.py index 92c967f..01be84f 100755 --- a/cope2n-api/fwd_api/utils/accuracy.py +++ b/cope2n-api/fwd_api/utils/accuracy.py @@ -408,7 +408,7 @@ class ReportAccumulateByRequest: _report[accuracy_type][key] = _report[accuracy_type][key]() _report["average_accuracy_rate"]["avg"] = _report["average_accuracy_rate"]["avg"]() - _report["review_progress"] = _report["review_progress"].count(1)/(_report["review_progress"].count(0)+ _report["review_progress"].count(1)) if (_report["review_progress"].count(0)+ _report["review_progress"].count(1)) >0 else 0 + _report["review_progress"] = _report["review_progress"].count(1)/(_report["review_progress"].count(0)+ _report["review_progress"].count(1)) if (_report["review_progress"].count(0)+ _report["review_progress"].count(1)) >0 else 1.0 _report["images_quality"]["successful_percent"] = _report["images_quality"]["successful"]/_report["total_images"] if _report["total_images"] > 0 else 0 _report["images_quality"]["bad_percent"] = _report["images_quality"]["bad"]/_report["total_images"] if _report["total_images"] > 0 else 0 # export data for dashboard