1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

fix sqlite lock (#5184)

* fix sqlite lock

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>

* fix bug

Co-Authored-By: lunny <xiaolunwen@gmail.com>
This commit is contained in:
Lunny Xiao
2018-10-27 22:45:24 +08:00
committed by GitHub
parent 99c09dfbfa
commit 2b7c366f64
3 changed files with 17 additions and 5 deletions

View File

@@ -655,9 +655,9 @@ func (issue *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository,
}
// Check for open dependencies
if isClosed && issue.Repo.IsDependenciesEnabled() {
if isClosed && issue.Repo.isDependenciesEnabled(e) {
// only check if dependencies are enabled and we're about to close an issue, otherwise reopening an issue would fail when there are unsatisfied dependencies
noDeps, err := IssueNoDependenciesLeft(issue)
noDeps, err := issueNoDependenciesLeft(e, issue)
if err != nil {
return err
}
@@ -721,6 +721,7 @@ func (issue *Issue) ChangeStatus(doer *User, repo *Repository, isClosed bool) (e
if err = sess.Commit(); err != nil {
return fmt.Errorf("Commit: %v", err)
}
sess.Close()
mode, _ := AccessLevel(issue.Poster.ID, issue.Repo)
if issue.IsPull {