Skip to content

Commit a74e7e2

Browse files
authored
fix: display workflow (#53)
1 parent 6ee23b3 commit a74e7e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

uns_mcp/server.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,16 @@ async def get_workflow_info(ctx: Context, workflow_id: str) -> str:
311311
result.append(f"Name: {info.name}")
312312
result.append(f"ID: {info.id}")
313313
result.append(f"Status: {info.status.value}")
314-
result.append(f"Type: {info.workflow_type.value}")
314+
if info.workflow_type is None:
315+
result.append("Type: Undefined")
316+
else:
317+
result.append(f"Type: {info.workflow_type.value}")
315318

316319
result.append("\nSources:")
317320
for source in info.sources:
318321
result.append(f" - {source}")
319322

320-
if info.workflow_type == WorkflowType.CUSTOM.value:
323+
if info.workflow_type and info.workflow_type == WorkflowType.CUSTOM.value:
321324
result.append("\nWorkflow Nodes:")
322325
for node in info.workflow_nodes:
323326
result.append(f" - {node.name} (Type: {node.type.value}) (Subtype: {node.subtype}):")

0 commit comments

Comments
 (0)