From d63e75ddd2d8fe980abf3570fb1508090453dcca Mon Sep 17 00:00:00 2001 From: yackob03 Date: Fri, 8 Nov 2013 14:04:03 -0500 Subject: [PATCH] Fix the mega query. --- data/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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))