Replace Poll runtime assertions

This commit is contained in:
2026-07-21 03:16:24 +02:00
parent 2c776437b4
commit 83d04d2f33
2 changed files with 4 additions and 2 deletions

View File

@@ -483,7 +483,8 @@ def transition_poll(
elif action == "close":
poll.closed_at = now
elif action == "decide":
assert decision_option is not None
if decision_option is None:
raise PollError("A decide transition requires a poll option")
poll.decided_option_id = decision_option.id
poll.decided_at = now
if poll.closed_at is None: