fix: respect is_ai=False in get_teams filter (#22)
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m7s
All checks were successful
Build Docker Image / build (pull_request) Successful in 3m7s
`all_teams.where(Team.is_ai)` always filtered for AI teams regardless of the caller's intent. Match the existing has_guide pattern and use explicit boolean comparison so False is handled correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
41c50dac4f
commit
dde9c1310f
@ -150,7 +150,10 @@ async def get_teams(
|
|||||||
all_teams = all_teams.where(Team.has_guide == True)
|
all_teams = all_teams.where(Team.has_guide == True)
|
||||||
|
|
||||||
if is_ai is not None:
|
if is_ai is not None:
|
||||||
all_teams = all_teams.where(Team.is_ai)
|
if not is_ai:
|
||||||
|
all_teams = all_teams.where(Team.is_ai == False)
|
||||||
|
else:
|
||||||
|
all_teams = all_teams.where(Team.is_ai == True)
|
||||||
|
|
||||||
if event_id is not None:
|
if event_id is not None:
|
||||||
all_teams = all_teams.where(Team.event_id == event_id)
|
all_teams = all_teams.where(Team.event_id == event_id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user