Consolidate redundant double-query in get_one_play #14

Closed
opened 2026-02-20 06:52:21 +00:00 by cal · 1 comment
Owner

`app/routers_v2/stratplays.py:1405-1412`. First calls `get_or_none` to check existence, discards result, then calls `get_by_id` again. Two round-trips for one record.

Priority: low

\`app/routers_v2/stratplays.py:1405-1412\`. First calls \`get_or_none\` to check existence, discards result, then calls \`get_by_id\` again. Two round-trips for one record. **Priority**: low
cal added the
performance
tech-debt
labels 2026-02-20 06:52:21 +00:00
cal added the
ai-working
label 2026-03-04 03:01:07 +00:00
cal removed the
ai-working
label 2026-03-04 03:03:09 +00:00
Author
Owner

Fixed in PR #52: #52

Stored the get_or_none result instead of discarding it, then returned it directly — eliminating the redundant get_by_id call.

Fixed in PR #52: https://git.manticorum.com/cal/paper-dynasty-database/pulls/52 Stored the `get_or_none` result instead of discarding it, then returned it directly — eliminating the redundant `get_by_id` call.
cal added the
ai-pr-opened
label 2026-03-04 03:03:15 +00:00
cal closed this issue 2026-03-05 03:36:27 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 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/paper-dynasty-database#14
No description provided.