Fix logic errors - eek!
This commit is contained in:
parent
24a0a140c7
commit
e4bd80c26d
@ -96,7 +96,7 @@ class STVCCounter:
|
|||||||
|
|
||||||
__pragma__('opov')
|
__pragma__('opov')
|
||||||
surplus = count_card.votes - self.quota
|
surplus = count_card.votes - self.quota
|
||||||
transfer_value = surplus / self.quota
|
transfer_value = surplus / count_card.votes
|
||||||
count_card.transfers -= surplus
|
count_card.transfers -= surplus
|
||||||
__pragma__('noopov')
|
__pragma__('noopov')
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ class STVCCounter:
|
|||||||
# Compute quota
|
# Compute quota
|
||||||
__pragma__('opov')
|
__pragma__('opov')
|
||||||
total = sum((cc.votes for c, cc in self.candidates.items()), Num('0'))
|
total = sum((cc.votes for c, cc in self.candidates.items()), Num('0'))
|
||||||
self.quota = total / Num(self.election.seats)
|
self.quota = total / Num(self.election.seats + 1)
|
||||||
__pragma__('noopov')
|
__pragma__('noopov')
|
||||||
|
|
||||||
def elect_meeting_quota(self):
|
def elect_meeting_quota(self):
|
||||||
|
Reference in New Issue
Block a user