Skip to content

Commit

Permalink
sort fix
Browse files Browse the repository at this point in the history
  • Loading branch information
umayangag committed Nov 17, 2019
1 parent 1038597 commit 83bf1b8
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 83bf1b8

Please sign in to comment.