def create_vote_dict(vote):
    for_vote_sorted = vote.for_votes()\
                          .order_by('member__current_party')\
                          .select_related('member','member__current_party')
    for_vote_sorted = list(for_vote_sorted)
    for_votes_grouped = split_member_vote_list_by_party(for_vote_sorted)
    against_vote_sorted = vote.against_votes()\
                              .order_by('member__current_party')\
                              .select_related('member','member__current_party')
    against_vote_sorted = list(against_vote_sorted)
    against_votes_grouped = split_member_vote_list_by_party(against_vote_sorted)

    vote_drill_data = dict({'against': dict({'count': len(against_vote_sorted),
                                          'votes' : against_votes_grouped}),
                            'for': dict({ 'count' : len(for_vote_sorted),
                                          'votes' : for_votes_grouped})})

    vote_dict = dict({'vote' : vote,
                          'vote_drill_data' : json.dumps(vote_drill_data),
                          'vote_passed' : vote.against_votes_count > vote.for_votes_count,
                          'vote_time' : {'day' : vote.time.day,
                           'month' : vote.time.month,
                           'year' : vote.time.year}})
    return vote_dict
dataset/ETHPy150Open ofri/Open-Knesset/laws/templatetags/bills_tags.py/create_vote_dict/swapped operands of `>`