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

Can't change direction of delegation in one transaction #2365

Closed
luisa-beerboom opened this issue Apr 10, 2024 · 2 comments · Fixed by #2500
Closed

Can't change direction of delegation in one transaction #2365

luisa-beerboom opened this issue Apr 10, 2024 · 2 comments · Fixed by #2500
Assignees
Milestone

Comments

@luisa-beerboom
Copy link
Member

Something like

{
  "action": "user.update",
  "data": [
    {
      "id": 4,
      "meeting_id": 2,
      "vote_delegated_to_id": null,
      "vote_delegations_from_ids": [
        6
      ],
    }
  ]
}

Will throw error User(s) [5] can't delegate their votes because they receive vote delegations. if there was already a delegation between these users (pointing in the other direction) before the call.
Since that very delegation is supposed to be deleted through this action, there is no reason why this should raise an error.
This should be fixed.

It may also be worthwhile to look into whether this also happens if the same transaction is started from the other direction (from-delegation deleted, to delegation opened)

@luisa-beerboom luisa-beerboom added this to the 4.2 milestone Apr 10, 2024
@jsangmeister
Copy link
Contributor

I think this might be related to #1801, but I don't think either of those is worth investigating now as this will be resolved with the relational db sometime in the undeterminate future

@luisa-beerboom
Copy link
Member Author

To me it seems more like a calculation error in the check_vote_delegations_from_ids method of the MeetingUserMixin.
That's where the error is thrown.

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

Successfully merging a pull request may close this issue.

3 participants