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

Fix model selection in HTR service page

parent 31f91aae
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ class AddTranskribusHTRPipelineJobForm(AddJobForm):
del self.binarization.render_kw['disabled']
models = [
x for x in TranskribusHTRModel.query.filter().all()
if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
if x.shared == True or x.user == current_user
]
self.model.choices = [('', 'Choose your option')]
self.model.choices += [(x.hashid, x.transkribus_name) for x in models]
......
......@@ -210,7 +210,7 @@ def transkribus_htr_pipeline():
return make_response({'redirect_url': url_for('jobs.job', job_id=job.id)}, 201) # noqa
transkribus_htr_models = [
x for x in TranskribusHTRModel.query.filter().all()
if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
if x.shared == True or x.user == current_user
]
return render_template(
f'services/transkribus_htr_pipeline.html.j2',
......@@ -287,4 +287,4 @@ def corpus_analysis():
return render_template(
'services/corpus_analysis.html.j2',
title='Corpus analysis'
)
\ No newline at end of file
)
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