Skip to content

Commit

Permalink
final report sort DESC
Browse files Browse the repository at this point in the history
  • Loading branch information
umayangag committed Nov 17, 2019
1 parent b0ed22c commit 1ec537f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from orm.enums import TallySheetCodeEnum, AreaTypeEnum
from sqlalchemy import and_
from datetime import datetime
import operator


class TallySheetVersion_PRE_ALL_ISLAND_RESULT_Model(TallySheetVersion.Model):
Expand Down Expand Up @@ -203,6 +204,7 @@ def get_html_content_dict(self):
to_percentage(candidate_wise_valid_vote_count_result_item.validVotePercentage)
])

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

0 comments on commit 1ec537f

Please sign in to comment.