summaryrefslogtreecommitdiffstats
path: root/models/repo_collaboration.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-09-25 12:59:27 +0800
committerGitHub <noreply@github.com>2017-09-25 12:59:27 +0800
commitdd55534b82ca9527b68fddf0f63ebb13c105c466 (patch)
tree5e1398ac3d07da8b7e4cb4fdd52695cea19b62b7 /models/repo_collaboration.go
parent6b6f16cfae5636deb88003fc5b0290450afb4137 (diff)
downloadgitea-dd55534b82ca9527b68fddf0f63ebb13c105c466.tar.gz
gitea-dd55534b82ca9527b68fddf0f63ebb13c105c466.zip
Reduce usage of allcols on update (#2596)
* reduce usage of allcols on update * fix bug and tests
Diffstat (limited to 'models/repo_collaboration.go')
-rw-r--r--models/repo_collaboration.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go
index 791f022a3f..0448149e6a 100644
--- a/models/repo_collaboration.go
+++ b/models/repo_collaboration.go
@@ -143,7 +143,7 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode
if _, err = sess.
Id(collaboration.ID).
- AllCols().
+ Cols("mode").
Update(collaboration); err != nil {
return fmt.Errorf("update collaboration: %v", err)
} else if _, err = sess.Exec("UPDATE access SET mode = ? WHERE user_id = ? AND repo_id = ?", mode, uid, repo.ID); err != nil {