Add type annotations to untyped query parameters #73
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#73
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem
Several FastAPI endpoint parameters lack type annotations:
seasoninapp/routers_v3/transactions.pyline 39stan_idinapp/routers_v3/standings.pyline 84Without annotations, FastAPI treats these as strings. PostgreSQL is strict about type comparison — comparing an
IntegerFieldto a string may fail or produce unexpected results.Fix
Add
season: intandstan_id: inttype annotations.Severity
Medium — potential runtime type mismatch on PostgreSQL.
PR #86 opens the fix: #86
Added
inttype annotations toseasonintransactions.pyandstan_idinstandings.pyso FastAPI correctly parses these as integers instead of passing strings to the ORM.