fix: respect is_ai=False in get_teams filter (#22) #41
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#41
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-database#22"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes
is_aifilter inget_teamsendpoint to correctly handleFalsevalues.Root Cause
all_teams.where(Team.is_ai)always evaluated as a truthy column reference, filtering for AI teams regardless of whether the caller passedis_ai=False.Fix
Applied the same explicit boolean comparison pattern already used by the adjacent
has_guidefilter:Files Changed
app/routers_v2/teams.py(lines 152–156)Tests
No test suite in this repo. Change verified by code review — logic now matches the existing
has_guidepattern and is PostgreSQL-compatible.dde9c1310fto3e15acbb9d