diff --git a/app/contributions/routes.py b/app/contributions/routes.py index d9565f88..f9e4d2c5 100644 --- a/app/contributions/routes.py +++ b/app/contributions/routes.py @@ -124,7 +124,10 @@ def delete_spacy_model(spacy_nlp_pipeline_model_id): snpm = SpaCyNLPPipelineModel.query.get(spacy_nlp_pipeline_model_id) if snpm is None: resonse_data = { - 'message': f'"{snpm.title}" not found', + 'message': ( + 'SpaCy NLP Pipeline Model with id' + f' "{spacy_nlp_pipeline_model_id}" not found' + ), 'category': 'error' } response = jsonify(resonse_data) @@ -169,7 +172,10 @@ def update_spacy_nlp_pipeline_model_is_public(spacy_nlp_pipeline_model_id): snpm = SpaCyNLPPipelineModel.query.get(spacy_nlp_pipeline_model_id) if snpm is None: resonse_data = { - 'message': f'"{snpm.title}" not found', + 'message': ( + 'SpaCy NLP Pipeline Model with id' + f' "{spacy_nlp_pipeline_model_id}" not found' + ), 'category': 'error' } response = jsonify(resonse_data) @@ -283,7 +289,10 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id): topm = TesseractOCRPipelineModel.query.get(tesseract_ocr_pipeline_model_id) if topm is None: resonse_data = { - 'message': f'"{topm.title}" not found', + 'message': ( + 'Tesseract OCR Pipeline Model with id' + f' "{tesseract_ocr_pipeline_model_id}" not found' + ), 'category': 'error' } response = jsonify(resonse_data) @@ -328,7 +337,10 @@ def update_tesseract_ocr_pipeline_model_is_public(tesseract_ocr_pipeline_model_i topm = TesseractOCRPipelineModel.query.get(tesseract_ocr_pipeline_model_id) if topm is None: resonse_data = { - 'message': f'"{topm.title}" not found', + 'message': ( + 'Tesseract OCR Pipeline Model with id' + f' "{tesseract_ocr_pipeline_model_id}" not found' + ), 'category': 'error' } response = jsonify(resonse_data)