Check Consistency MJ Vote
Class used to check if there is a conflict between a single option and majority judgment vote for polls also votable with MJ.
CheckConsistencyMjVote
Source code in apps/votes_results/classes/vote_consistency/check_consistency_mj_vote.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
check(single_option_vote_key, mj_votes)
staticmethod
Checks if the single option vote key is consistent with the majority judgment votes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
single_option_vote_key |
str
|
Single option vote id. |
required |
mj_votes |
List[dict]
|
List of dicts with mj keys and ratings. Example: [{'poll_choice_id': 1, 'rating': 3}, {'poll_choice_id': 2, 'rating': 2}] |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
True if the single option vote key is consistent with the majority judgment votes, False otherwise. |
Source code in apps/votes_results/classes/vote_consistency/check_consistency_mj_vote.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |