def get_assigned_team(participant, hackathon):
    """ Return the team for the current hackathon for a participant """
    participant_team = None
    if not hackathon.teams:
        return

    teams = hackathon.teams.all()
    participant_team = [team for team in teams
                        if participant in team.participants.all()]

    if len(participant_team) == 0:
        return

    return participant_team[0]