middfle commit

This commit is contained in:
TannedCung 2024-06-14 18:27:49 +07:00
parent 45d3f61898
commit c9c3f92150

View File

@ -984,9 +984,11 @@ class AccuracyViewSet(viewsets.ViewSet):
} }
for k, v in file_result.items(): for k, v in file_result.items():
if k in sample_result.keys(): if k in sample_result.keys():
if k == "purchase_date" and v is not None:
v = v.split("")
if not isinstance(sample_result[k], list): if not isinstance(sample_result[k], list):
sample_result[k] = v sample_result[k] = v
elif v: else:
sample_result[k].append(v) sample_result[k].append(v)
if subscription_request_file.reviewed_result is not None: if subscription_request_file.reviewed_result is not None:
@ -994,10 +996,8 @@ class AccuracyViewSet(viewsets.ViewSet):
else: else:
subscription_request_file.reviewed_result = sample_result subscription_request_file.reviewed_result = sample_result
if reason: subscription_request_file.reason = reason
subscription_request_file.reason = reason subscription_request_file.counter_measures = solution
if solution:
subscription_request_file.counter_measures = solution
subscription_request_file.is_reviewed = True subscription_request_file.is_reviewed = True
subscription_request_file.save() subscription_request_file.save()
is_available = True is_available = True