mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Fix #185
This commit is contained in:
parent
b0084b1adc
commit
9100786beb
3 changed files with 22 additions and 10 deletions
|
@ -337,18 +337,18 @@ func UpdateAssignee(ctx *middleware.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
idx, err := base.StrTo(ctx.Query("issue")).Int64()
|
||||
issueId, err := base.StrTo(ctx.Query("issue")).Int64()
|
||||
if err != nil {
|
||||
ctx.Error(404)
|
||||
return
|
||||
}
|
||||
|
||||
issue, err := models.GetIssueByIndex(ctx.Repo.Repository.Id, idx)
|
||||
issue, err := models.GetIssueById(issueId)
|
||||
if err != nil {
|
||||
if err == models.ErrIssueNotExist {
|
||||
ctx.Handle(404, "issue.UpdateAssignee", err)
|
||||
ctx.Handle(404, "issue.UpdateAssignee(GetIssueById)", err)
|
||||
} else {
|
||||
ctx.Handle(500, "issue.UpdateAssignee(GetIssueByIndex)", err)
|
||||
ctx.Handle(500, "issue.UpdateAssignee(GetIssueById)", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue