diff --git a/backend/tasks/views.py b/backend/tasks/views.py index 99bdf3a88..b150328f7 100644 --- a/backend/tasks/views.py +++ b/backend/tasks/views.py @@ -288,9 +288,12 @@ def list(self, request, *args, **kwargs): if (ann_status[0] in ["labeled", "draft", "to_be_revised"]) and ( proj_type == "ContextualTranslationEditing" ): - tas["data"]["output_text"] = annotation_result_json[idx][0][ - "value" - ]["text"][0] + try: + tas["data"]["output_text"] = annotation_result_json[idx][0][ + "value" + ]["text"][0] + except: + tas["data"]["output_text"] = "-" del tas["data"]["machine_translation"] ordered_tasks.append(tas)