summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-01-24 00:39:58 -0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-24 10:39:58 +0800
commit521d429b58c78864c1809b67005ce0bc80d2e484 (patch)
treee81fa84cc2a74e9e1d6b2f7b7456c863214a46a7
parent3461003a0fead49e5c19e092aec30adf349052ab (diff)
downloadgitea-521d429b58c78864c1809b67005ce0bc80d2e484.tar.gz
gitea-521d429b58c78864c1809b67005ce0bc80d2e484.zip
Fix link of some repos on stars page (#737)
Link was wrong the repo was of another owner
-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
}