Skip to content

Commit

Permalink
Limitando los resultados
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Álvarez committed Oct 30, 2017
1 parent 164f3b2 commit ea843bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions medianaranja2/calculator.py
Expand Up @@ -64,5 +64,6 @@ def get_result(self):
for index in range(len(_result)):
concatenated.append({'candidate': candidates_vector[index][0], 'value': _result[index][0]})
concatenated = sorted(concatenated, key=lambda t: -t['value'])
concatenated = concatenated[:config.N_CANDIDATOS_RESULTADO_12_N]
result = {'election': self.election, 'candidates': concatenated}
return result

0 comments on commit ea843bc

Please sign in to comment.