Fix: Update with AI
This commit is contained in:
parent
c5ac3b3c81
commit
b845406cdf
@ -112,7 +112,7 @@ def create_accuracy_report(report_id, **kwargs):
|
|||||||
continue
|
continue
|
||||||
request_att, _report_files = calculate_a_request(report, request)
|
request_att, _report_files = calculate_a_request(report, request)
|
||||||
report_files += _report_files
|
report_files += _report_files
|
||||||
report_engine.add(request, _report_files)
|
report_engine.add(request, _report_files, report)
|
||||||
request.feedback_accuracy = {"imei_number": mean_list(request_att["acc"]["feedback"].get("imei_number", [None])),
|
request.feedback_accuracy = {"imei_number": mean_list(request_att["acc"]["feedback"].get("imei_number", [None])),
|
||||||
"purchase_date": mean_list(request_att["acc"]["feedback"].get("purchase_date", [None])),
|
"purchase_date": mean_list(request_att["acc"]["feedback"].get("purchase_date", [None])),
|
||||||
"retailername": mean_list(request_att["acc"]["feedback"].get("retailername", [None])),
|
"retailername": mean_list(request_att["acc"]["feedback"].get("retailername", [None])),
|
||||||
|
@ -24,7 +24,7 @@ def login(host, username, password):
|
|||||||
return token
|
return token
|
||||||
|
|
||||||
|
|
||||||
def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_success=True):
|
def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_success=True, sub=None):
|
||||||
files = []
|
files = []
|
||||||
if invoice_files:
|
if invoice_files:
|
||||||
for file in invoice_files:
|
for file in invoice_files:
|
||||||
@ -35,6 +35,8 @@ def make_sbt_request(host, token, invoice_files=None, imei_files=None, ensure_su
|
|||||||
num_files = len(files)
|
num_files = len(files)
|
||||||
files.append(('processType', '12'))
|
files.append(('processType', '12'))
|
||||||
files.append(('is_test_request', 'True'))
|
files.append(('is_test_request', 'True'))
|
||||||
|
if sub:
|
||||||
|
files.append(("subsidiary", sub))
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
end_of_upload_time = 0
|
end_of_upload_time = 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user