Skip to content
Snippets Groups Projects
Commit 0d7fca9b authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Fix logic error

parent 0e7e5933
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,10 @@ def delete_spacy_model(spacy_nlp_pipeline_model_id): ...@@ -124,7 +124,10 @@ def delete_spacy_model(spacy_nlp_pipeline_model_id):
snpm = SpaCyNLPPipelineModel.query.get(spacy_nlp_pipeline_model_id) snpm = SpaCyNLPPipelineModel.query.get(spacy_nlp_pipeline_model_id)
if snpm is None: if snpm is None:
resonse_data = { 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' 'category': 'error'
} }
response = jsonify(resonse_data) response = jsonify(resonse_data)
...@@ -169,7 +172,10 @@ def update_spacy_nlp_pipeline_model_is_public(spacy_nlp_pipeline_model_id): ...@@ -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) snpm = SpaCyNLPPipelineModel.query.get(spacy_nlp_pipeline_model_id)
if snpm is None: if snpm is None:
resonse_data = { 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' 'category': 'error'
} }
response = jsonify(resonse_data) response = jsonify(resonse_data)
...@@ -283,7 +289,10 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id): ...@@ -283,7 +289,10 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id):
topm = TesseractOCRPipelineModel.query.get(tesseract_ocr_pipeline_model_id) topm = TesseractOCRPipelineModel.query.get(tesseract_ocr_pipeline_model_id)
if topm is None: if topm is None:
resonse_data = { 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' 'category': 'error'
} }
response = jsonify(resonse_data) response = jsonify(resonse_data)
...@@ -328,7 +337,10 @@ def update_tesseract_ocr_pipeline_model_is_public(tesseract_ocr_pipeline_model_i ...@@ -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) topm = TesseractOCRPipelineModel.query.get(tesseract_ocr_pipeline_model_id)
if topm is None: if topm is None:
resonse_data = { 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' 'category': 'error'
} }
response = jsonify(resonse_data) response = jsonify(resonse_data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment