mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 22:18:39 +02: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:
1 parent
a08856606e
commit
714ecd9f1e
6 files changed
+153
-96
No files matched your search
@@ -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