From 3eac878f3abba73c37db5925d77bedfd66f58839 Mon Sep 17 00:00:00 2001 From: TannedCung Date: Fri, 31 May 2024 12:20:18 +0700 Subject: [PATCH] Fix: None raw accuracy on non fb requests --- cope2n-api/fwd_api/celery_worker/process_report_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cope2n-api/fwd_api/celery_worker/process_report_tasks.py b/cope2n-api/fwd_api/celery_worker/process_report_tasks.py index ac4e25a..4bd6bc3 100755 --- a/cope2n-api/fwd_api/celery_worker/process_report_tasks.py +++ b/cope2n-api/fwd_api/celery_worker/process_report_tasks.py @@ -141,7 +141,7 @@ def create_accuracy_report(report_id, **kwargs): request.raw_accuracy = mean_list(rq_accuracy["reviewed"]) elif len(rq_accuracy["feedback"]) > 0: request.raw_accuracy = mean_list(rq_accuracy["feedback"]) - request.is_required = request.raw_accuracy < settings.BAD_THRESHOLD + request.is_required = request.raw_accuracy < settings.BAD_THRESHOLD if isinstance(request.raw_accuracy, float) else False # No need to review by default request.save() number_images += request_att["total_images"]