diff --git a/data/model/legacy.py b/data/model/legacy.py index f9d8fd57a..0d65796d5 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -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: