UN-2885 [FIX] Fix MinIO cleanup failure due to incorrect organization ID format in workflow execution context (#1590)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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": {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user