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
|
self.data[this_month][0]['num_request'] += 1
|
||||||
|
|
||||||
for report_file in report_files:
|
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 = copy.deepcopy(report_file)
|
||||||
report_file.acc = None
|
if _report_file.is_bad_image or _report_file.bad_image_reason in settings.ACC_EXCLUDE_RESEASONS:
|
||||||
for t in report_file.feedback_accuracy.keys():
|
_report_file.acc = None
|
||||||
report_file.feedback_accuracy[t] = []
|
for t in _report_file.feedback_accuracy.keys():
|
||||||
for t in report_file.reviewed_accuracy.keys():
|
_report_file.feedback_accuracy[t] = []
|
||||||
report_file.reviewed_accuracy[t] = []
|
for t in _report_file.reviewed_accuracy.keys():
|
||||||
self.data[this_month][0] = self.update_total(self.data[this_month][0], report_file) # Update the subtotal within the month
|
_report_file.reviewed_accuracy[t] = []
|
||||||
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
|
|
||||||
|
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):
|
def count_transactions_within_day(self, date_string):
|
||||||
# convert this day into timezone.datetime at UTC
|
# 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"]["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["acc"]["reviewed"], rv_max_indexes = acc_maximize_list_values(att["acc"]["reviewed"])
|
||||||
|
|
||||||
|
|
||||||
_att = copy.deepcopy(att)
|
_att = copy.deepcopy(att)
|
||||||
|
|
||||||
if status != 200:
|
if status != 200:
|
||||||
|
Loading…
Reference in New Issue
Block a user