Skip to content

Commit

Permalink
Merge pull request #382 from umayangag/sort-final-result
Browse files Browse the repository at this point in the history
sort fix
  • Loading branch information
dinukadesilva authored Nov 17, 2019
2 parents 1038597 + 83bf1b8 commit ed34fb3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ def get_html_content_dict(self):
candidate_wise_valid_vote_count_result_item.candidateName,
candidate_wise_valid_vote_count_result_item.partyAbbreviation,
to_comma_seperated_num(candidate_wise_valid_vote_count_result_item.validVoteCount),
to_percentage(candidate_wise_valid_vote_count_result_item.validVotePercentage)
to_percentage(candidate_wise_valid_vote_count_result_item.validVotePercentage),
candidate_wise_valid_vote_count_result_item.validVoteCount
])

content['data'] = sorted(content['data'], key=operator.itemgetter(2), reverse=True)
content['data'] = sorted(content['data'], key=operator.itemgetter(4), reverse=True)
content["validVoteCounts"] = [
to_comma_seperated_num(vote_count_result["validVoteCount"]),
to_percentage(vote_count_result["validVoteCountPercentage"])
Expand Down

0 comments on commit ed34fb3

Please sign in to comment.