diff options
Diffstat (limited to 'backend/routes')
| -rw-r--r-- | backend/routes/forms/condorcet.py | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/backend/routes/forms/condorcet.py b/backend/routes/forms/condorcet.py index 1b216a1..902770b 100644 --- a/backend/routes/forms/condorcet.py +++ b/backend/routes/forms/condorcet.py @@ -78,6 +78,11 @@ class Condorcet(Route):                  detail="Requested more winners than there are candidates", status_code=400              ) +        if question.type != "vote": +            raise InvalidCondorcetRequest( +                detail="Requested question is not a condorcet vote component", status_code=400 +            ) +          cursor = request.state.db.responses.find(              {"form_id": form_id},          ) | 
