lexicongovernance / pluraltools-backend

Backend implementation of the plural voting tool.
https://demo.lexicongovernance.org/
GNU General Public License v3.0
3 stars 1 forks source link

Update vote service to allow for different grouping dimensions when calculating the plurality score #311

Closed MartinBenediktBusch closed 5 months ago

MartinBenediktBusch commented 5 months ago

This PR allows to specify group categories that should be taken into account for the plurality score calculation by question_id.

However, there is one complicating factor. Our main grouping dimension affiliation is not related to a group category. Therefore, we must allow for it to be a group category of type null in the usersToGroups table. Nevertheless this is not a group category in the group categories table becaus it cannot have an id that is not null.

requiring a group category id would simplify the code dramatically. We should think it implement the following migration prior to the event: https://github.com/lexicongovernance/pluraltools-backend/issues/300