From 7553e74a96f8c33719ec5ec27dc3f03edf16976e Mon Sep 17 00:00:00 2001 From: Pavel Date: Thu, 20 Aug 2026 14:05:42 +0200 Subject: [PATCH] Fix 2 --- application/api/user/agents/portability.py | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/application/api/user/agents/portability.py b/application/api/user/agents/portability.py index 406fbdca..cdb1b5c8 100644 --- a/application/api/user/agents/portability.py +++ b/application/api/user/agents/portability.py @@ -1292,19 +1292,6 @@ def apply_import(conn, user: str, doc: dict, resolution: Optional[dict] = None) ) is_workflow = (spec.get("agent_type") or "classic") == "workflow" - if is_workflow: - workflow_result = _apply_workflow( - conn, - user, - spec, - target, - tool_ids_by_key, - source_ids_by_name, - model_ids_by_name, - warnings, - ) - else: - workflow_result = _WORKFLOW_UNCHANGED agents_repo = AgentsRepository(conn) is_update = bool(target.get("action") == "update" and target.get("agent_id")) @@ -1354,6 +1341,16 @@ def apply_import(conn, user: str, doc: dict, resolution: Optional[dict] = None) "extra_source_ids": [], } ) + workflow_result = _apply_workflow( + conn, + user, + spec, + target, + tool_ids_by_key, + source_ids_by_name, + model_ids_by_name, + warnings, + ) if workflow_result is not _WORKFLOW_UNCHANGED: if workflow_result is None and (target.get("status") or "") == "published": warnings.append(