From 2c141e3b60f60c95fb46e9fa537d91cf5466b8e4 Mon Sep 17 00:00:00 2001 From: dx-tan Date: Fri, 3 May 2024 08:50:44 +0700 Subject: [PATCH] Remove outdated request files out of detail report --- cope2n-api/fwd_api/utils/accuracy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cope2n-api/fwd_api/utils/accuracy.py b/cope2n-api/fwd_api/utils/accuracy.py index 4a7f6ac..ca39725 100755 --- a/cope2n-api/fwd_api/utils/accuracy.py +++ b/cope2n-api/fwd_api/utils/accuracy.py @@ -827,14 +827,15 @@ def calculate_a_request(report, request): images = SubscriptionRequestFile.objects.filter(request=request, file_category=FileCategory.Origin.value) report_files = [] for image in images: - if image.processing_time < 0: - continue + status, att = calculate_subcription_file(image) att["acc"]["feedback"], fb_max_indexes = acc_maximize_list_values(att["acc"]["feedback"]) att["acc"]["reviewed"], rv_max_indexes = acc_maximize_list_values(att["acc"]["reviewed"]) _att = copy.deepcopy(att) + if image.processing_time < 0: + continue if status != 200: continue image.feedback_accuracy = att["acc"]["feedback"] # dict {key: [values]}