From 0002f75232e1871d3760f4d31bd1f2005e31eacb Mon Sep 17 00:00:00 2001 From: chihlasm Date: Wed, 25 Feb 2026 19:51:49 -0500 Subject: [PATCH] fix: handle None author_id in step sync to avoid invalid UUID error When a system/default tree has no author (author_id is None), str(None) produces the literal string 'None' which asyncpg rejects as an invalid UUID for the created_by column. Co-Authored-By: Claude Sonnet 4.6 --- backend/app/core/step_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/core/step_sync.py b/backend/app/core/step_sync.py index 4a42066a..825a4ad9 100644 --- a/backend/app/core/step_sync.py +++ b/backend/app/core/step_sync.py @@ -157,7 +157,7 @@ async def sync_steps_from_tree( "title": step_data["title"], "step_type": step_data["step_type"], "content": json.dumps(step_data["content"]), - "created_by": str(author_id), + "created_by": str(author_id) if author_id else None, "account_id": str(account_id) if account_id else None, "visibility": visibility, "source_tree_id": str(tree_id),