diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-05-21 02:35:45 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-21 14:35:45 +0800 |
commit | b0308d86dc124f17d6b67e9d1022a4085c9267e1 (patch) | |
tree | f1cb3915edb12c35c5b02146cd4dae86bb426ba4 /models/repo.go | |
parent | cf02cd7ba0c94165743660cf30f0cbb5a73a385e (diff) | |
download | gitea-b0308d86dc124f17d6b67e9d1022a4085c9267e1.tar.gz gitea-b0308d86dc124f17d6b67e9d1022a4085c9267e1.zip |
Fix unloaded owner (#1770)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index 0c755241ce..a50aa2dc27 100644 --- a/models/repo.go +++ b/models/repo.go @@ -353,8 +353,9 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) ( return nil } - err = repo.getUnits(e) - if err != nil { + if err = repo.getUnits(e); err != nil { + return err + } else if err = repo.getOwner(e); err != nil { return err } |