diff options
Diffstat (limited to 'models/branches.go')
-rw-r--r-- | models/branches.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/branches.go b/models/branches.go index a71c0e9622..6115f9c687 100644 --- a/models/branches.go +++ b/models/branches.go @@ -95,7 +95,7 @@ func (repo *Repository) AddProtectedBranch(branchName string, canPush bool) erro } sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } @@ -126,7 +126,7 @@ func (repo *Repository) ChangeProtectedBranch(id int64, canPush bool) error { ProtectedBranch.CanPush = canPush sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } @@ -146,7 +146,7 @@ func (repo *Repository) DeleteProtectedBranch(id int64) (err error) { } sess := x.NewSession() - defer sessionRelease(sess) + defer sess.Close() if err = sess.Begin(); err != nil { return err } |