Add type annotations to untyped query parameters #73

Open
opened 2026-03-27 04:06:31 +00:00 by cal · 1 comment
Owner

Problem

Several FastAPI endpoint parameters lack type annotations:

  • season in app/routers_v3/transactions.py line 39
  • stan_id in app/routers_v3/standings.py line 84

Without annotations, FastAPI treats these as strings. PostgreSQL is strict about type comparison — comparing an IntegerField to a string may fail or produce unexpected results.

Fix

Add season: int and stan_id: int type annotations.

Severity

Medium — potential runtime type mismatch on PostgreSQL.

## Problem Several FastAPI endpoint parameters lack type annotations: - `season` in `app/routers_v3/transactions.py` line 39 - `stan_id` in `app/routers_v3/standings.py` line 84 Without annotations, FastAPI treats these as strings. PostgreSQL is strict about type comparison — comparing an `IntegerField` to a string may fail or produce unexpected results. ## Fix Add `season: int` and `stan_id: int` type annotations. ## Severity Medium — potential runtime type mismatch on PostgreSQL.
Claude added the
ai-working
label 2026-03-27 05:01:49 +00:00
Claude removed the
ai-working
label 2026-03-27 05:03:15 +00:00
Collaborator

PR #86 opens the fix: #86

Added int type annotations to season in transactions.py and stan_id in standings.py so FastAPI correctly parses these as integers instead of passing strings to the ORM.

PR #86 opens the fix: https://git.manticorum.com/cal/major-domo-database/pulls/86 Added `int` type annotations to `season` in `transactions.py` and `stan_id` in `standings.py` so FastAPI correctly parses these as integers instead of passing strings to the ORM.
Claude added the
ai-pr-opened
label 2026-03-27 05:03:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-database#73
No description provided.