Skip to content

Commit c23927d

Browse files
phernandezclaude
andcommitted
fix: use canonical project names in API response messages
Use database-retrieved project names (new_project.name, old_project.name) instead of input parameters (project_data.name, name) in v1 API response messages to ensure consistent project name casing. The v2 API already did this correctly. This fixes issue #450 where project names would display with different casing between add and remove operations. Fixes #450 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
1 parent 1a74d85 commit c23927d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/basic_memory/api/routers/project_router.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ async def add_project(
274274
raise HTTPException(status_code=500, detail="Failed to retrieve newly created project")
275275

276276
return ProjectStatusResponse( # pyright: ignore [reportCallIssue]
277-
message=f"Project '{project_data.name}' added successfully",
277+
message=f"Project '{new_project.name}' added successfully",
278278
status="success",
279279
default=project_data.set_default,
280280
new_project=ProjectItem(
@@ -329,7 +329,7 @@ async def remove_project(
329329
await project_service.remove_project(name, delete_notes=delete_notes)
330330

331331
return ProjectStatusResponse(
332-
message=f"Project '{name}' removed successfully",
332+
message=f"Project '{old_project.name}' removed successfully",
333333
status="success",
334334
default=False,
335335
old_project=ProjectItem(

0 commit comments

Comments
 (0)