Skip to content

Fix stage direction style DELETE (reads ID from query param, not body)#993

Merged
Tim020 merged 1 commit into
devfrom
fix/stage-direction-style-delete
May 6, 2026
Merged

Fix stage direction style DELETE (reads ID from query param, not body)#993
Tim020 merged 1 commit into
devfrom
fix/stage-direction-style-delete

Conversation

@Tim020
Copy link
Copy Markdown
Contributor

@Tim020 Tim020 commented May 6, 2026

Summary

  • The delete() handler in StageDirectionStylesController was calling escape.json_decode(self.request.body) to read the style ID, but DELETE requests carry no body
  • The frontend correctly sends the ID as a query parameter (?id=N), matching every other DELETE endpoint in the codebase (characters, cast, cues, etc.)
  • Fix replaces the body decode with self.get_argument("id", None) + int() validation, and adds ERROR_INVALID_ID to imports

Test plan

  • test_delete_stage_direction_style — happy path: 200, style removed from DB
  • test_delete_stage_direction_style_missing_id — no id param → 400
  • test_delete_stage_direction_style_invalid_idid=abc → 400
  • test_delete_stage_direction_style_not_found — unknown ID → 404
  • Full test suite: 580 passed
  • ruff check: no issues

🤖 Generated with Claude Code

…of body

The delete handler was calling escape.json_decode(self.request.body) but
DELETE requests carry no body — the frontend sends the ID as a query
parameter (?id=N), matching all other DELETE endpoints in the codebase.
Replaces body decode with self.get_argument("id", None) + int validation
and adds four tests covering happy path, missing ID, invalid ID, and 404.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Tim020 Tim020 added the claude Issues created by Claude label May 6, 2026
@github-actions github-actions Bot added small-diff Small pull request server Pull requests changing back end code labels May 6, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Client Test Results

99 tests  ±0   99 ✅ ±0   0s ⏱️ ±0s
 4 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 4177cb5. ± Comparison against base commit 88d3d1b.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Python Test Results

  1 files  ±0    1 suites  ±0   1m 23s ⏱️ +8s
580 tests +4  580 ✅ +4  0 💤 ±0  0 ❌ ±0 
585 runs  +4  585 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit 4177cb5. ± Comparison against base commit 88d3d1b.

@Tim020 Tim020 enabled auto-merge (squash) May 6, 2026 23:12
@Tim020 Tim020 merged commit 0a7d8f2 into dev May 6, 2026
25 checks passed
@Tim020 Tim020 deleted the fix/stage-direction-style-delete branch May 6, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude Issues created by Claude server Pull requests changing back end code small-diff Small pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant