aboutsummaryrefslogtreecommitdiff
path: root/routers/web/repo/issue_stopwatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/issue_stopwatch.go')
-rw-r--r--routers/web/repo/issue_stopwatch.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/routers/web/repo/issue_stopwatch.go b/routers/web/repo/issue_stopwatch.go
index 3d20b08b4..3e715437e 100644
--- a/routers/web/repo/issue_stopwatch.go
+++ b/routers/web/repo/issue_stopwatch.go
@@ -86,7 +86,7 @@ func GetActiveStopwatch(ctx *context.Context) {
return
}
- _, sw, err := issues_model.HasUserStopwatch(ctx, ctx.Doer.ID)
+ _, sw, issue, err := issues_model.HasUserStopwatch(ctx, ctx.Doer.ID)
if err != nil {
ctx.ServerError("HasUserStopwatch", err)
return
@@ -96,18 +96,6 @@ func GetActiveStopwatch(ctx *context.Context) {
return
}
- issue, err := issues_model.GetIssueByID(ctx, sw.IssueID)
- if err != nil || issue == nil {
- if !issues_model.IsErrIssueNotExist(err) {
- ctx.ServerError("GetIssueByID", err)
- }
- return
- }
- if err = issue.LoadRepo(ctx); err != nil {
- ctx.ServerError("LoadRepo", err)
- return
- }
-
ctx.Data["ActiveStopwatch"] = StopwatchTmplInfo{
issue.Link(),
issue.Repo.FullName(),