fix: return promoted default state from project create API

When add_project promotes a new project because the configured default is missing from the database, return the persisted default flag instead of echoing the request flag.

Signed-off-by: rudi193-cmd <rudi193@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
rudi193-cmd
2026-06-12 07:40:25 -06:00
committed by Paul Hernandez
parent b92b0340d5
commit 25732b2fe2
2 changed files with 42 additions and 1 deletions
@@ -193,7 +193,7 @@ async def add_project(
return ProjectStatusResponse( # pyright: ignore [reportCallIssue]
message=f"Project '{new_project.name}' added successfully",
status="success",
default=project_data.set_default,
default=new_project.is_default or False,
new_project=ProjectItem(
id=new_project.id,
external_id=new_project.external_id,