fix: remove unimplemented is_trade parameter from GET /api/v3/transactions (#27) #57
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#57
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ai/major-domo-database-27"
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
is_trade: Optional[bool] = Nonefrom theget_transactionsfunction signatureif is_trade is not None: raise HTTPException(status_code=501, ...))Reason
The
Transactionmodel indb_engine.pyhas nois_tradefield, so this parameter cannot be implemented without a schema migration. Removing it is the correct approach for an undocumented/unplanned feature stub.Files Changed
app/routers_v3/transactions.pyNotes
ruff/black auto-reformatted the file on edit (single→double quotes, line wrapping, trailing commas). This is cosmetic noise expected from the project's linter setup and does not affect functionality.
Other observations
.idattribute on Peewee model classes (lines 69, 141, 145, 149) — unrelated to this changex.dict()deprecation warning (Pydantic v1 → v2) at line 154 — pre-existingCloses #27
AI Code Review
Files Reviewed
app/routers_v3/transactions.py(modified)Findings
Correctness
is_tradeparameter and its 501 stub are cleanly removed fromget_transactions. No other logic is affected.is_trade=truewould have received a 501; they will now receive a 200 with data (FastAPI silently ignores unrecognized query params). This is strictly better UX for a parameter that was never functional.Transactionhas nois_tradefield — removal is the right call without a schema migration.Security
{token}interpolation inlogger.warningcalls atpatch_transactions,post_transactions, anddelete_transactionsremains, but this is tracked by PR #45 and is out of scope here.Style & Conventions
Suggestions
Verdict: APPROVED
Correct, minimal removal of a dead stub. No logic changes beyond the targeted deletion. Merge when ready.
Automated review by Claude PR Reviewer
Checkout
From your project repository, check out a new branch and test the changes.