From 7661377e007c5014842315e6b482fa4f7e70d9cd Mon Sep 17 00:00:00 2001 From: ali <117142933+muhammad-ali-e@users.noreply.github.com> Date: Wed, 15 Oct 2025 14:32:11 +0530 Subject: [PATCH] UN-2885 [FIX] Fix MinIO cleanup failure due to incorrect organization ID format in workflow execution context (#1590) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UN-2885 [FIX] Fix MinIO cleanup failure due to incorrect organization ID format Fixed MinIO path mismatch causing cleanup failures by correcting the organization_id format returned in workflow execution context. Changed backend/workflow_manager/internal_views.py:443 from returning numeric organization.id (e.g., "2") to string organization.organization_id (e.g., "org_HJqNgodUQsA99S3A") in _get_organization_context() method. This ensures MinIO cleanup uses the correct organization ID format that matches the paths where tools write execution files. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude --- backend/workflow_manager/internal_views.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/workflow_manager/internal_views.py b/backend/workflow_manager/internal_views.py index af6431b2..41160448 100644 --- a/backend/workflow_manager/internal_views.py +++ b/backend/workflow_manager/internal_views.py @@ -440,14 +440,18 @@ class WorkflowExecutionInternalViewSet(viewsets.ReadOnlyModelViewSet): if execution.workflow and hasattr(execution.workflow, "organization"): org = execution.workflow.organization return { - "organization_id": str(org.id), - "organization_name": org.display_name, + "organization_id": str( + org.organization_id + ), # organization identifier + "organization_uuid": str(org.id), # organization uuid + "organization_name": org.display_name, # organization name "settings": {}, # Add organization-specific settings if needed } else: logger.warning(f"No organization found for execution {execution.id}") return { "organization_id": None, + "organization_uuid": None, "organization_name": "Unknown", "settings": {}, } @@ -457,6 +461,7 @@ class WorkflowExecutionInternalViewSet(viewsets.ReadOnlyModelViewSet): ) return { "organization_id": None, + "organization_uuid": None, "organization_name": "Unknown", "settings": {}, }