Fix runtime session check and standardize workflow edge handles in editor

This commit is contained in:
2026-06-15 15:29:33 +02:00
parent 8a0d825274
commit f562fd5c01
2 changed files with 7 additions and 1 deletions

View File

@@ -596,6 +596,8 @@ class WorkflowRuntime:
db = self.db_factory()
try:
run = db.query(WorkflowRun).filter(WorkflowRun.id == run_id).first()
if run is None or not run.session_id:
return
session = db.query(chat_models.ChatSession).filter(chat_models.ChatSession.session_id == run.session_id).first()
if session is None:
raise RuntimeError("Chat session no longer exists.")