diff options
author | Lauris BH <lauris@nix.lv> | 2018-07-20 05:10:17 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-07-20 10:10:17 +0800 |
commit | 0c59edaafa94738b8eaec1620f20887cc35d90e2 (patch) | |
tree | 344496bf031508008428db4b9537a68953a44320 /models/repo.go | |
parent | 1e2da5d396141c9c240151d8736862f7d04aa46f (diff) | |
download | gitea-0c59edaafa94738b8eaec1620f20887cc35d90e2.tar.gz gitea-0c59edaafa94738b8eaec1620f20887cc35d90e2.zip |
Update xorm to latest version and fix correct `user` table referencing in sql (#4473)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go index e87883969d..3c4908b0d8 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1958,7 +1958,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error { func GetRepositoryByOwnerAndName(ownerName, repoName string) (*Repository, error) { var repo Repository has, err := x.Select("repository.*"). - Join("INNER", "user", "`user`.id = repository.owner_id"). + Join("INNER", "`user`", "`user`.id = repository.owner_id"). Where("repository.lower_name = ?", strings.ToLower(repoName)). And("`user`.lower_name = ?", strings.ToLower(ownerName)). Get(&repo) |