API: no_project filter + project_id on tasks route
- list_notes(): add no_project param → Note.project_id.is_(None) filter - GET /api/notes: expose ?no_project=true - GET /api/tasks: add ?project_id= and ?no_project=true pass-through Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -85,6 +85,7 @@ async def list_notes(
|
||||
milestone_id: int | None = None,
|
||||
milestone_ids: list[int] | None = None,
|
||||
parent_id: int | None = None,
|
||||
no_project: bool = False,
|
||||
sort: str = "updated_at",
|
||||
order: str = "desc",
|
||||
limit: int = 50,
|
||||
@@ -152,6 +153,10 @@ async def list_notes(
|
||||
|
||||
if parent_id is not None:
|
||||
query = query.where(Note.parent_id == parent_id)
|
||||
|
||||
if no_project:
|
||||
query = query.where(Note.project_id.is_(None))
|
||||
count_query = count_query.where(Note.project_id.is_(None))
|
||||
count_query = count_query.where(Note.parent_id == parent_id)
|
||||
|
||||
sort_col = getattr(Note, sort, Note.updated_at)
|
||||
|
||||
Reference in New Issue
Block a user