diff --git a/data/model.py b/data/model.py index 4f44d863d..cae167acf 100644 --- a/data/model.py +++ b/data/model.py @@ -432,7 +432,7 @@ def get_visible_repositories(username=None, include_public=True, limit=None, .join(Org, JOIN_LEFT_OUTER, on=(Org.username == Repository.namespace)) .join(AdminTeam, JOIN_LEFT_OUTER, on=(Org.id == AdminTeam.organization)) - .join(TeamRole, JOIN_LEFT_OUTER) + .join(TeamRole, JOIN_LEFT_OUTER, on=(AdminTeam.role == TeamRole.id)) .switch(AdminTeam) .join(AdminTeamMember, JOIN_LEFT_OUTER, on=(AdminTeam.id == AdminTeamMember.team))