Revert "Remove old search API which is no longer in use"
This commit is contained in:
parent
e441a58a8d
commit
fe2cd240bc
5 changed files with 160 additions and 5 deletions
|
@ -181,6 +181,12 @@ def get_matching_admined_teams(team_prefix, user_obj, limit=10):
|
|||
return query
|
||||
|
||||
|
||||
def get_matching_teams(team_prefix, organization):
|
||||
team_prefix_search = _basequery.prefix_search(Team.name, team_prefix)
|
||||
query = Team.select().where(team_prefix_search, Team.organization == organization)
|
||||
return query.limit(10)
|
||||
|
||||
|
||||
def get_teams_within_org(organization):
|
||||
return Team.select().where(Team.organization == organization)
|
||||
|
||||
|
|
Reference in a new issue