def vote_percentage(ticket):
    """
        Get the percentage value of votes a ticket receives
        :param ticket: The requested ticket to get vote percentage for
        :return: percentage of votes received in relation to other tickets
    """

    count = ticket.votes.count()

    if count == 0:
        return 0

    total_votes = ticket.poll.votes.count()
    return (100 / total_votes) * count