diff options
Diffstat (limited to 'models/repo_collaboration.go')
-rw-r--r-- | models/repo_collaboration.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go index 39df5b9efa..791f022a3f 100644 --- a/models/repo_collaboration.go +++ b/models/repo_collaboration.go @@ -46,7 +46,7 @@ func (repo *Repository) AddCollaborator(u *User) error { collaboration.Mode = AccessModeWrite sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } @@ -136,7 +136,7 @@ func (repo *Repository) ChangeCollaborationAccessMode(uid int64, mode AccessMode collaboration.Mode = mode sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } @@ -161,7 +161,7 @@ func (repo *Repository) DeleteCollaboration(uid int64) (err error) { } sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } |