Skip to content

Commit

Permalink
Hosts: Add ChallengeHostTeam model getter functions. (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
RishabhJain2018 authored and taranjeet committed Jun 25, 2017
1 parent 588fb8c commit f86a39f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/hosts/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from .models import ChallengeHost
from base.utils import get_model_object

from .models import ChallengeHost, ChallengeHostTeam


def get_challenge_host_teams_for_user(user):
"""Returns challenge host team ids for a particular user"""
return ChallengeHost.objects.filter(user=user).values_list('team_name', flat=True)

get_challenge_host_team_model = get_model_object(ChallengeHostTeam)

0 comments on commit f86a39f

Please sign in to comment.