Only check for open dependencies if they are enabled

This commit is contained in:
kolaente 2018-02-27 19:14:04 +01:00 committed by Gitea
parent 138a80b7fa
commit 264f895967

View File

@ -614,7 +614,8 @@ func (issue *Issue) changeStatus(e *xorm.Session, doer *User, repo *Repository,
}
// Check for open dependencies
if isClosed { // only check if we're about to close an issue, otherwise reopening an issue would fail when there are unsatisfied dependencies
if isClosed && issue.Repo.IsDependenciesEnabled() {
// 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)
if err != nil {
return err