Fix: missleading 0 review progress

This commit is contained in:
TannedCung 2024-06-28 15:40:18 +07:00
parent 3668ec7e42
commit 7e114cd456

View File

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