diff --git a/backend/functions/utils.py b/backend/functions/utils.py index 66a47537d..e8f8ae01d 100644 --- a/backend/functions/utils.py +++ b/backend/functions/utils.py @@ -532,10 +532,9 @@ def get_batch_ocr_predictions_using_google(id, image_url): } ocr_prediction = ocr_format_conversion(ocr_prediction) - ocr_prediction_json = json.dumps(ocr_prediction, ensure_ascii=False) - ocr_predictions.append(ocr_prediction_json) - - return ocr_predictions + ocr_predictions.append(ocr_prediction) + ocr_predictions_json = json.dumps(ocr_predictions, ensure_ascii=False) + return ocr_predictions_json # Function to get the bounding box for a feature diff --git a/backend/workspaces/tasks.py b/backend/workspaces/tasks.py index c871d9865..0e8747d57 100644 --- a/backend/workspaces/tasks.py +++ b/backend/workspaces/tasks.py @@ -1647,6 +1647,7 @@ def send_user_analysis_reports_mail_ws( ): ws = Workspace.objects.get(pk=pk) user = User.objects.get(id=user_id) + final_reports = [] if reports_type == "review": proj_objs = Project.objects.filter(workspace_id=pk) @@ -1728,7 +1729,6 @@ def send_user_analysis_reports_mail_ws( supercheck_projects_ids.append(supercheck_project.id) workspace_superchecker_list = list(set(workspace_superchecker_list)) - final_reports = [] if ( user.role == User.ORGANIZATION_OWNER @@ -1782,7 +1782,6 @@ def send_user_analysis_reports_mail_ws( users_id = [user.id for user in ws.members.all()] selected_language = "-" - final_reports = [] for index, each_annotation_user in enumerate(users_id): name = user_name[index] email = user_mail[index]