diff --git a/cope2n-api/fwd_api/api/accuracy_view.py b/cope2n-api/fwd_api/api/accuracy_view.py index 890c515..fe119f4 100644 --- a/cope2n-api/fwd_api/api/accuracy_view.py +++ b/cope2n-api/fwd_api/api/accuracy_view.py @@ -686,7 +686,13 @@ class AccuracyViewSet(viewsets.ViewSet): subscription_request_file.reviewed_result = reviewed_result subscription_request_file.reviewed_result['imei_number'] = [] elif subscription_request_file.doc_type == 'imei': - subscription_request_file.reviewed_result = {"retailername": None, "sold_to_party": None, "purchase_date": [], "imei_number": [reviewed_result["imei_number"][subscription_request_file.index_in_request]]} + subscription_request_file.reviewed_result = { + "retailername": None, + "sold_to_party": None, + "purchase_date": [], + "imei_number": []} + if len(reviewed_result["imei_number"]) - 1 >= subscription_request_file.index_in_request: + subscription_request_file.reviewed_result["imei_number"] = reviewed_result["imei_number"][subscription_request_file.index_in_request] subscription_request_file.save() subscription_request.reviewed_result = reviewed_result