aboutsummaryrefslogtreecommitdiffstats
path: root/models/star.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/star.go')
-rw-r--r--models/star.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/models/star.go b/models/star.go
index 923bab57b5..997b223a18 100644
--- a/models/star.go
+++ b/models/star.go
@@ -81,7 +81,15 @@ func (u *User) GetStarredRepos(private bool) (repos []*Repository, err error) {
sess = sess.And("is_private = ?", false)
}
- err = sess.
- Find(&repos)
+ if err = sess.Find(&repos); err != nil {
+ return
+ }
+
+ for _, repo := range repos {
+ if err = repo.GetOwner(); err != nil {
+ return
+ }
+ }
+
return
}