mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Fix logic error
This commit is contained in:
parent
0e7e5933cc
commit
0d7fca9b0b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user