mirror of
				https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
				synced 2025-11-04 04:12:45 +00:00 
			
		
		
		
	Privacy settings for profile pages
This commit is contained in:
		@@ -73,11 +73,11 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
        if 'methods' in service_info:
 | 
			
		||||
            if 'binarization' in service_info['methods']:
 | 
			
		||||
                del self.binarization.render_kw['disabled']
 | 
			
		||||
            if 'ocropus_nlbin_threshold' in service_info['methods']:
 | 
			
		||||
                del self.ocropus_nlbin_threshold.render_kw['disabled']
 | 
			
		||||
                if 'ocropus_nlbin_threshold' in service_info['methods']:
 | 
			
		||||
                    del self.ocropus_nlbin_threshold.render_kw['disabled']
 | 
			
		||||
        models = [
 | 
			
		||||
            x for x in TesseractOCRPipelineModel.query.order_by(TesseractOCRPipelineModel.title).all()
 | 
			
		||||
            if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
 | 
			
		||||
            if version in x.compatible_service_versions and (x.is_public == True or x.user == current_user)
 | 
			
		||||
        ]
 | 
			
		||||
        self.model.choices = [('', 'Choose your option')]
 | 
			
		||||
        self.model.choices += [(x.hashid, f'{x.title} [{x.version}]') for x in models]
 | 
			
		||||
@@ -157,7 +157,7 @@ class CreateSpacyNLPPipelineJobForm(CreateJobBaseForm):
 | 
			
		||||
                del self.encoding_detection.render_kw['disabled']
 | 
			
		||||
        models = [
 | 
			
		||||
            x for x in SpaCyNLPPipelineModel.query.order_by(SpaCyNLPPipelineModel.title).all()
 | 
			
		||||
            if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
 | 
			
		||||
            if version in x.compatible_service_versions and (x.is_public == True or x.user == current_user)
 | 
			
		||||
        ]
 | 
			
		||||
        self.model.choices = [('', 'Choose your option')]
 | 
			
		||||
        self.model.choices += [(x.hashid, f'{x.title} [{x.version}]') for x in models]
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@ def tesseract_ocr_pipeline():
 | 
			
		||||
        return {}, 201, {'Location': job.url}
 | 
			
		||||
    tesseract_ocr_pipeline_models = [
 | 
			
		||||
        x for x in TesseractOCRPipelineModel.query.all()
 | 
			
		||||
        if version in x.compatible_service_versions and (x.shared == True or x.user == current_user)
 | 
			
		||||
        if version in x.compatible_service_versions and (x.is_public == True or x.user == current_user)
 | 
			
		||||
    ]
 | 
			
		||||
    return render_template(
 | 
			
		||||
        'services/tesseract_ocr_pipeline.html.j2',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user