fix wrong urls in contributions

This commit is contained in:
Patrick Jentsch 2022-11-15 15:22:41 +01:00
parent 9d34a5b71b
commit 1f896b9bff

View File

@ -32,7 +32,7 @@ def contributions():
) )
@bp.route('/tesseract_ocr_pipeline_models/<hashid:tesseract_ocr_pipeline_model_id>', methods=['GET', 'POST']) @bp.route('/tesseract-ocr-pipeline-models/<hashid:tesseract_ocr_pipeline_model_id>', methods=['GET', 'POST'])
def tesseract_ocr_pipeline_model(tesseract_ocr_pipeline_model_id): def tesseract_ocr_pipeline_model(tesseract_ocr_pipeline_model_id):
tesseract_ocr_pipeline_model = TesseractOCRPipelineModel.query.get_or_404(tesseract_ocr_pipeline_model_id) tesseract_ocr_pipeline_model = TesseractOCRPipelineModel.query.get_or_404(tesseract_ocr_pipeline_model_id)
form = EditTesseractOCRPipelineModelForm(prefix='edit-tesseract-ocr-pipeline-model-form') form = EditTesseractOCRPipelineModelForm(prefix='edit-tesseract-ocr-pipeline-model-form')
@ -70,7 +70,7 @@ def tesseract_ocr_pipeline_model(tesseract_ocr_pipeline_model_id):
) )
@bp.route('/tesseract_ocr_pipeline_models/<hashid:tesseract_ocr_pipeline_model_id>', methods=['DELETE']) @bp.route('/tesseract-ocr-pipeline-models/<hashid:tesseract_ocr_pipeline_model_id>', methods=['DELETE'])
def delete_tesseract_model(tesseract_ocr_pipeline_model_id): def delete_tesseract_model(tesseract_ocr_pipeline_model_id):
def _delete_tesseract_ocr_pipeline_model(app, tesseract_ocr_pipeline_model_id): def _delete_tesseract_ocr_pipeline_model(app, tesseract_ocr_pipeline_model_id):
with app.app_context(): with app.app_context():
@ -89,7 +89,7 @@ def delete_tesseract_model(tesseract_ocr_pipeline_model_id):
return {}, 202 return {}, 202
@bp.route('/tesseract_ocr_pipeline_models/create', methods=['GET', 'POST']) @bp.route('/tesseract-ocr-pipeline-models/create', methods=['GET', 'POST'])
def create_tesseract_ocr_pipeline_model(): def create_tesseract_ocr_pipeline_model():
form = CreateTesseractOCRPipelineModelForm(prefix='create-tesseract-ocr-pipeline-model-form') form = CreateTesseractOCRPipelineModelForm(prefix='create-tesseract-ocr-pipeline-model-form')
if form.is_submitted(): if form.is_submitted():