From 28592e352c21cda97ec14fdddec7643669c7339b Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Sat, 18 Jun 2016 13:07:13 +1000 Subject: [PATCH] More changes that make abstention work --- symposion/reviews/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/symposion/reviews/models.py b/symposion/reviews/models.py index 77acb1dd..f6234d51 100644 --- a/symposion/reviews/models.py +++ b/symposion/reviews/models.py @@ -20,7 +20,7 @@ def score_expression(): (2 * F("plus_two") + F("plus_one")) - (F("minus_one") + 2 * F("minus_two")) ) / ( - F("vote_count") - F("abstain") + F("vote_count") - F("abstain") * 1.0 ) @@ -276,6 +276,7 @@ class ProposalResult(models.Model): def update_vote(self, vote, previous=None, removal=False): mapping = { + VOTES.ABSTAIN: "abstain", VOTES.PLUS_TWO: "plus_two", VOTES.PLUS_ONE: "plus_one", VOTES.MINUS_ONE: "minus_one",