fix: remove duplicate ranking_max filter in get_teams (#21) #42
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#42
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/paper-dynasty-database#21"
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
Removes the duplicate
ranking_maxfilter block atapp/routers_v2/teams.py:141-143that was a no-op copy-paste of the filter already applied at lines 138-140.Changes
app/routers_v2/teams.py: Removed 3 lines (duplicateif ranking_max is not Noneblock)Tests
No test suite exists for this repo. Change verified by code review — the duplicate block was identical to the preceding block and had no functional effect.
Closes #21
AI Code Review
Files Reviewed
app/routers_v2/teams.py(modified)Findings
Correctness
if ranking_max is not Noneblock at the old lines 141–143 was byte-for-byte identical to the block at lines 138–140. Removing it is functionally correct: Peewee's query builder would have emittedWHERE ranking <= $1 AND ranking <= $1, which is valid SQL but redundant. The removal has no observable effect on query results.Security
Style & Conventions
get_teams. The surrounding code is untouched and consistent.Suggestions
Verdict: APPROVED
Clean, minimal removal of a no-op duplicate filter. The change is correct, safe, and closes the issue as described.
Automated review by Claude PR Reviewer