summaryrefslogtreecommitdiffstats
path: root/services/issue/status.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/issue/status.go')
-rw-r--r--services/issue/status.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/services/issue/status.go b/services/issue/status.go
index 5b8d21274d..64fbccd26a 100644
--- a/services/issue/status.go
+++ b/services/issue/status.go
@@ -8,6 +8,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
user_model "code.gitea.io/gitea/models/user"
+ "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
)
@@ -15,10 +16,9 @@ import (
func ChangeStatus(issue *models.Issue, doer *user_model.User, closed bool) error {
comment, err := issue.ChangeStatus(doer, closed)
if err != nil {
- // Don't return an error when dependencies are open as this would let the push fail
- if models.IsErrDependenciesLeft(err) {
- if closed {
- return models.FinishIssueStopwatchIfPossible(db.DefaultContext, doer, issue)
+ if models.IsErrDependenciesLeft(err) && closed {
+ if err := models.FinishIssueStopwatchIfPossible(db.DefaultContext, doer, issue); err != nil {
+ log.Error("Unable to stop stopwatch for issue[%d]#%d: %v", issue.ID, issue.Index, err)
}
}
return err