Commit ffe144e0 authored by Jamesie Pic's avatar Jamesie Pic

Oh, just fixed score update ^^

parent 8ff84b92
......@@ -63,18 +63,19 @@ class MemopolVote(Vote):
@cached_property
def absolute_score(self):
if self.proposal.recommendation:
recommendation = self.proposal.recommendation
weight = recommendation.weight
if (self.position == 'abstain' or
if not self.proposal.recommendation_id:
return 0
recommendation = self.proposal.recommendation
weight = recommendation.weight
if (self.position == 'abstain' or
recommendation.recommendation == 'abstain'):
weight = weight / 2
if self.position == recommendation.recommendation:
return weight
else:
return -weight
weight = weight / 2
if self.position == recommendation.recommendation:
return weight
else:
return 0
return -weight
def vote_pre_import(sender, vote_data=None, **kwargs):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment