Fix: Blank accuracy
This commit is contained in:
parent
3eb6ab61a9
commit
d75d51b0a5
@ -214,14 +214,16 @@ class ReportAccumulateByRequest:
|
||||
self.data[this_month][0]['num_request'] += 1
|
||||
|
||||
for report_file in report_files:
|
||||
if report_file.is_bad_image or report_file.bad_image_reason in settings.ACC_EXCLUDE_RESEASONS:
|
||||
report_file.acc = None
|
||||
for t in report_file.feedback_accuracy.keys():
|
||||
report_file.feedback_accuracy[t] = []
|
||||
for t in report_file.reviewed_accuracy.keys():
|
||||
report_file.reviewed_accuracy[t] = []
|
||||
self.data[this_month][0] = self.update_total(self.data[this_month][0], report_file) # Update the subtotal within the month
|
||||
self.data[this_month][1][this_day] = self.update_day(self.data[this_month][1][this_day], report_file) # Update the subtotal of the day
|
||||
_report_file = copy.deepcopy(report_file)
|
||||
if _report_file.is_bad_image or _report_file.bad_image_reason in settings.ACC_EXCLUDE_RESEASONS:
|
||||
_report_file.acc = None
|
||||
for t in _report_file.feedback_accuracy.keys():
|
||||
_report_file.feedback_accuracy[t] = []
|
||||
for t in _report_file.reviewed_accuracy.keys():
|
||||
_report_file.reviewed_accuracy[t] = []
|
||||
|
||||
self.data[this_month][0] = self.update_total(self.data[this_month][0], _report_file) # Update the subtotal within the month
|
||||
self.data[this_month][1][this_day] = self.update_day(self.data[this_month][1][this_day], _report_file) # Update the subtotal of the day
|
||||
|
||||
def count_transactions_within_day(self, date_string):
|
||||
# convert this day into timezone.datetime at UTC
|
||||
@ -821,7 +823,6 @@ def calculate_a_request(report, request):
|
||||
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 status != 200:
|
||||
|
Loading…
Reference in New Issue
Block a user