mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Fix model selection in HTR service page
This commit is contained in:
		@@ -113,7 +113,7 @@ class AddTranskribusHTRPipelineJobForm(AddJobForm):
 | 
				
			|||||||
                    del self.binarization.render_kw['disabled']
 | 
					                    del self.binarization.render_kw['disabled']
 | 
				
			||||||
        models = [
 | 
					        models = [
 | 
				
			||||||
            x for x in TranskribusHTRModel.query.filter().all()
 | 
					            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 = [('', 'Choose your option')]
 | 
				
			||||||
        self.model.choices += [(x.hashid, x.transkribus_name) for x in models]
 | 
					        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
 | 
					        return make_response({'redirect_url': url_for('jobs.job', job_id=job.id)}, 201)  # noqa
 | 
				
			||||||
    transkribus_htr_models = [
 | 
					    transkribus_htr_models = [
 | 
				
			||||||
        x for x in TranskribusHTRModel.query.filter().all()
 | 
					        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(
 | 
					    return render_template(
 | 
				
			||||||
        f'services/transkribus_htr_pipeline.html.j2',
 | 
					        f'services/transkribus_htr_pipeline.html.j2',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user