| 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														        Delete customized pipeline template. | 
														 | 
														 | 
														        Delete customized pipeline template. | 
													
													
												
													
														 | 
														 | 
														        """ | 
														 | 
														 | 
														        """ | 
													
													
												
													
														 | 
														 | 
														        customized_template: PipelineCustomizedTemplate | None = ( | 
														 | 
														 | 
														        customized_template: PipelineCustomizedTemplate | None = ( | 
													
													
												
													
														 | 
														 | 
														            db.query(PipelineCustomizedTemplate) | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														            db.session.query(PipelineCustomizedTemplate) | 
													
													
												
													
														 | 
														 | 
														            .filter( | 
														 | 
														 | 
														            .filter( | 
													
													
												
													
														 | 
														 | 
														                PipelineCustomizedTemplate.id == template_id, | 
														 | 
														 | 
														                PipelineCustomizedTemplate.id == template_id, | 
													
													
												
													
														 | 
														 | 
														                PipelineCustomizedTemplate.tenant_id == current_user.current_tenant_id, | 
														 | 
														 | 
														                PipelineCustomizedTemplate.tenant_id == current_user.current_tenant_id, | 
													
													
												
											
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														        ) | 
														 | 
														 | 
														        ) | 
													
													
												
													
														 | 
														 | 
														        if not customized_template: | 
														 | 
														 | 
														        if not customized_template: | 
													
													
												
													
														 | 
														 | 
														            raise ValueError("Customized pipeline template not found.") | 
														 | 
														 | 
														            raise ValueError("Customized pipeline template not found.") | 
													
													
												
													
														 | 
														 | 
														        db.delete(customized_template) | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														        db.commit() | 
														 | 
														 | 
														 | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														        db.session.delete(customized_template) | 
													
													
												
													
														 | 
														 | 
														 | 
														 | 
														 | 
														        db.session.commit() | 
													
													
												
													
														 | 
														 | 
														
  | 
														 | 
														 | 
														
  | 
													
													
												
													
														 | 
														 | 
														    def get_draft_workflow(self, pipeline: Pipeline) -> Optional[Workflow]: | 
														 | 
														 | 
														    def get_draft_workflow(self, pipeline: Pipeline) -> Optional[Workflow]: | 
													
													
												
													
														 | 
														 | 
														        """ | 
														 | 
														 | 
														        """ |