This commit is contained in:
jyong
2025-06-11 17:10:20 +08:00
parent 66fa68fa18
commit 5f08a9314c
2 changed files with 4 additions and 4 deletions

View File

@ -126,7 +126,7 @@ class RagPipelineService:
Delete customized pipeline template.
"""
customized_template: PipelineCustomizedTemplate | None = (
db.query(PipelineCustomizedTemplate)
db.session.query(PipelineCustomizedTemplate)
.filter(
PipelineCustomizedTemplate.id == template_id,
PipelineCustomizedTemplate.tenant_id == current_user.current_tenant_id,
@ -135,8 +135,8 @@ class RagPipelineService:
)
if not customized_template:
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]:
"""