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 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-21 04:13:37 -05:00
parent 2e65e65afd
commit 55bfeb8ec2

View File

@@ -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 =