Browse Source

Fix panic when view issue without login

tags/v1.2.0-rc1
Unknown 11 years ago
parent
commit
4ef9494637
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      routers/repo/issue.go

+ 6
- 4
routers/repo/issue.go View File

@@ -254,10 +254,12 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) {
}
}

// Update issue-user.
if err = models.UpdateIssueUserPairByRead(ctx.User.Id, issue.Id); err != nil {
ctx.Handle(500, "issue.ViewIssue(UpdateIssueUserPairByRead): %v", err)
return
if ctx.IsSigned {
// Update issue-user.
if err = models.UpdateIssueUserPairByRead(ctx.User.Id, issue.Id); err != nil {
ctx.Handle(500, "issue.ViewIssue(UpdateIssueUserPairByRead): %v", err)
return
}
}

// Get poster and Assignee.


Loading…
Cancel
Save