From 55bfeb8ec2069a7abf3006b63a89450a550160a9 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Sat, 21 Feb 2026 04:13:37 -0500 Subject: [PATCH] fix: pass explicit status='draft' when creating AI-generated flow Tree model defaults to 'published' in the DB schema, but passing status=None from the constructor overrides that default, causing a nullable=False violation and a 500 on save. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/ai-builder/AIFlowBuilderModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/ai-builder/AIFlowBuilderModal.tsx b/frontend/src/components/ai-builder/AIFlowBuilderModal.tsx index 8bbbd362..939876d2 100644 --- a/frontend/src/components/ai-builder/AIFlowBuilderModal.tsx +++ b/frontend/src/components/ai-builder/AIFlowBuilderModal.tsx @@ -56,6 +56,7 @@ export function AIFlowBuilderModal({ isOpen, onClose }: AIFlowBuilderModalProps) description: assembledTree.suggested_description, tree_structure: assembledTree.tree_structure, tree_type: metadata.flow_type, + status: 'draft', }) handleClose() const editorPath =