Flesh out some of the organization methods and fix the models.
This commit is contained in:
parent
ecc4ad6e0f
commit
4c0f987af3
5 changed files with 181 additions and 64 deletions
|
@ -208,11 +208,11 @@ def get_organization(orgname):
|
|||
abort(404)
|
||||
|
||||
user = current_user.db_user()
|
||||
organization = model.lookup_organization(orgname, username = user.username)
|
||||
if not organization:
|
||||
org = model.get_organization(orgname)
|
||||
if not org:
|
||||
abort(404)
|
||||
|
||||
teams = model.get_user_teams(user.username, organization)
|
||||
teams = model.get_user_teams_within_org(user.username, org)
|
||||
return jsonify(org_view(organization, teams))
|
||||
|
||||
|
||||
|
|
Reference in a new issue