summaryrefslogtreecommitdiffstats
path: root/models/repo_collaboration.go
diff options
context:
space:
mode:
authorThibault Meyer <meyer.thibault@gmail.com>2016-11-10 16:16:32 +0100
committerThibault Meyer <meyer.thibault@gmail.com>2016-11-10 20:59:51 +0100
commita4454f5d0fbeaacb94668012acbb4296465cb28f (patch)
treeeaf39d1935eda44cf16df08234d2bbddd39c3ddd /models/repo_collaboration.go
parentc040f2fbb13ef5ba2c6a619322d4801e9f78c885 (diff)
downloadgitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.tar.gz
gitea-a4454f5d0fbeaacb94668012acbb4296465cb28f.zip
Rewrite XORM queries
Diffstat (limited to 'models/repo_collaboration.go')
-rw-r--r--models/repo_collaboration.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go
index 214aa2a015..e5be729895 100644
--- a/models/repo_collaboration.go
+++ b/models/repo_collaboration.go
@@ -131,7 +131,10 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode
return err
}
- if _, err = sess.Id(collaboration.ID).AllCols().Update(collaboration); err != nil {
+ if _, err = sess.
+ Id(collaboration.ID).
+ AllCols().
+ 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 {
return fmt.Errorf("update access table: %v", err)