mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix close issue but time watcher still running (#17761)
* Fix bug * Update models/issue_stopwatch.go Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
@@ -55,8 +55,8 @@ func StartIssueStopwatch(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := models.CreateOrStopIssueStopwatch(ctx.User, issue); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "CreateOrStopIssueStopwatch", err)
|
||||
if err := models.CreateIssueStopwatch(ctx.User, issue); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "CreateIssueStopwatch", err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ func StopIssueStopwatch(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := models.CreateOrStopIssueStopwatch(ctx.User, issue); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "CreateOrStopIssueStopwatch", err)
|
||||
if err := models.FinishIssueStopwatch(ctx.User, issue); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "FinishIssueStopwatch", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user