fix: remove duplicate ranking_max filter in get_teams (#21) #42

Merged
cal merged 1 commits from ai/paper-dynasty-database#21 into next-release 2026-03-05 03:17:51 +00:00
Owner

Summary

Removes the duplicate ranking_max filter block at app/routers_v2/teams.py:141-143 that was a no-op copy-paste of the filter already applied at lines 138-140.

Changes

  • app/routers_v2/teams.py: Removed 3 lines (duplicate if ranking_max is not None block)

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

## Summary Removes the duplicate `ranking_max` filter block at `app/routers_v2/teams.py:141-143` that was a no-op copy-paste of the filter already applied at lines 138-140. ## Changes - `app/routers_v2/teams.py`: Removed 3 lines (duplicate `if ranking_max is not None` block) ## 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
cal added 1 commit 2026-03-03 22:02:04 +00:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cal added the
ai-reviewing
label 2026-03-03 22:16:16 +00:00
cal reviewed 2026-03-03 22:17:12 +00:00
cal left a comment
Author
Owner

AI Code Review

Files Reviewed

  • app/routers_v2/teams.py (modified)

Findings

Correctness

  • The duplicate if ranking_max is not None block 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 emitted WHERE ranking <= $1 AND ranking <= $1, which is valid SQL but redundant. The removal has no observable effect on query results.
  • No other logic was touched.

Security

  • No issues found. No new query parameters, no new user-controlled input paths.

Style & Conventions

  • Removal follows the existing filter pattern in get_teams. The surrounding code is untouched and consistent.
  • No unused imports introduced or removed.

Suggestions

  • None.

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

## AI Code Review ### Files Reviewed - `app/routers_v2/teams.py` (modified) ### Findings #### Correctness - The duplicate `if ranking_max is not None` block 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 emitted `WHERE ranking <= $1 AND ranking <= $1`, which is valid SQL but redundant. The removal has no observable effect on query results. - No other logic was touched. #### Security - No issues found. No new query parameters, no new user-controlled input paths. #### Style & Conventions - Removal follows the existing filter pattern in `get_teams`. The surrounding code is untouched and consistent. - No unused imports introduced or removed. #### Suggestions - None. ### 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*
cal added the
ai-reviewed
label 2026-03-03 22:17:38 +00:00
cal merged commit 20f727a119 into next-release 2026-03-05 03:17:51 +00:00
cal deleted branch ai/paper-dynasty-database#21 2026-03-05 03:17:52 +00:00
Sign in to join this conversation.
No description provided.