Skip to content

fix(api): treat deleted questions as not found when deleting or copying them - #3871

Merged
AndyScherzinger merged 1 commit into
mainfrom
fix/api-deleted-questions
Nov 11, 2026
Merged

AndyScherzinger merged 1 commit into
mainfrom
fix/api-deleted-questions

Conversation

@AndyScherzinger

Copy link
Copy Markdown
Member

Split out of #3833, so it can be merged and backported on its own. The commits are unchanged and drop out of #3833 once this is merged.

  • Deleting or copying a question that is already deleted returns 404. Deleting it again used to delete the first question of the form as well, and copying it brought it back.

Tests

  • ApiControllerTest covers both cases.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…ng them

A deleted question keeps its row with order 0. Deleting it again moved
every question after order 0 one position up, so the first question of
the form got order 0 and was deleted as well. Copying it failed when the
form had no other questions, and otherwise brought the deleted question
back as a copy.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
@AndyScherzinger AndyScherzinger added bug Something isn't working 3. to review Waiting for reviews labels Nov 11, 2026
@AndyScherzinger AndyScherzinger self-assigned this Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Chartman123

Copy link
Copy Markdown
Collaborator

/backport to stable5.4

@backportbot backportbot Bot added the backport-request Pending backport by the backport-bot label Nov 11, 2026
@AndyScherzinger
AndyScherzinger merged commit 06c5bcc into main Nov 11, 2026
51 checks passed
@AndyScherzinger
AndyScherzinger deleted the fix/api-deleted-questions branch November 11, 2026 09:07
@backportbot backportbot Bot removed the backport-request Pending backport by the backport-bot label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants