Merge pull request #128 from SDSRV-IDP/BE/review_page

Fix: None raw accuracy on non fb requests
This commit is contained in:
Đỗ Xuân Tân 2024-05-31 12:20:46 +07:00 committed by GitHub Enterprise
commit 5222cba0d5

View File

@ -141,7 +141,7 @@ def create_accuracy_report(report_id, **kwargs):
request.raw_accuracy = mean_list(rq_accuracy["reviewed"]) request.raw_accuracy = mean_list(rq_accuracy["reviewed"])
elif len(rq_accuracy["feedback"]) > 0: elif len(rq_accuracy["feedback"]) > 0:
request.raw_accuracy = mean_list(rq_accuracy["feedback"]) 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() request.save()
number_images += request_att["total_images"] number_images += request_att["total_images"]