Skip to content
Extraits de code Groupes Projets
Valider ffe144e0 rédigé par Jamesie Pic's avatar Jamesie Pic
Parcourir les fichiers

Oh, just fixed score update ^^

parent 8ff84b92
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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):
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter