Make sure to join the Repo table on its namespace user and its visibility so we don't issue additional queries from the starred repos API call
This commit is contained in:
parent
23fafa6b4a
commit
b50600cde8
1 changed files with 4 additions and 1 deletions
|
@ -2830,8 +2830,11 @@ def get_user_starred_repositories(user, limit=None, page=None):
|
|||
query = (Repository
|
||||
.select()
|
||||
.join(Star)
|
||||
.switch(Repository)
|
||||
.join(User)
|
||||
.where(User.id == user.id)
|
||||
.switch(Repository)
|
||||
.join(Visibility)
|
||||
.where(Star.user == user)
|
||||
.order_by(Star.created))
|
||||
|
||||
if page and limit:
|
||||
|
|
Reference in a new issue