Fix: empty string = None

This commit is contained in:
TannedCung 2024-06-17 11:12:24 +07:00
parent 637ef00f73
commit 74ff2a6794

View File

@ -990,7 +990,7 @@ class AccuracyViewSet(viewsets.ViewSet):
v = v.split("")
if not isinstance(sample_result[k], list):
sample_result[k] = v
else:
elif v:
sample_result[k].append(v)
if subscription_request_file.reviewed_result is not None:
@ -998,7 +998,9 @@ class AccuracyViewSet(viewsets.ViewSet):
else:
subscription_request_file.reviewed_result = sample_result
if reason:
subscription_request_file.reason = reason
if solution:
subscription_request_file.counter_measures = solution
subscription_request_file.is_reviewed = True
subscription_request_file.save()