Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assignment.update if candidate is already on LoS #2761

Closed
bspekker opened this issue Dec 9, 2024 · 0 comments · Fixed by #2768
Closed

Fix assignment.update if candidate is already on LoS #2761

bspekker opened this issue Dec 9, 2024 · 0 comments · Fixed by #2768
Assignees
Labels
Milestone

Comments

@bspekker
Copy link

bspekker commented Dec 9, 2024

Description
If candidate is already on LoS, candidate is not added to LoS when phase is changed to voting/in the election process.

Reproduction

  1. in settings > elections: enabe 'Put all candidates on the list of speakers'
  2. create an election
  3. add candidate A and B to list of candidates
  4. add candidate A to LoS
  5. change phase of election to 'in the election process' --> Error: User 5316 is already on the list of speakers. and no user is added to LoS and phase is not changed

Payload

[
  {
    "action": "assignment.update",
    "data": [
      {
        "id": 338,
        "phase": "voting"
      }
    ]
  }
]

Response

{
    "success": false,
    "message": "User 5316 is already on the list of speakers.",
    "action_error_index": 0,
    "action_data_error_index": 0
}

Expected behaviour
When changing the phase of the election, candidates that are not already on the LoS should be added and phase should be changed to 'in the election process'/voting.
(Candidates that are already on the LoS should be ignored)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants