Add the members tab to the org admin

This commit is contained in:
Joseph Schorr 2013-11-06 19:06:59 -05:00
parent fb1732d069
commit 56f777448a
5 changed files with 112 additions and 3 deletions

View file

@ -348,6 +348,12 @@ def get_organization_team(orgname, teamname):
return result[0]
def get_organization_members_with_teams(organization):
joined = TeamMember.select().annotate(Team).annotate(User)
query = joined.where(Team.organization == organization)
return query
def get_organization_team_members(teamid):
joined = User.select().join(TeamMember).join(Team)
query = joined.where(Team.id == teamid)