Fix PR, milestone and label functionality if issue unit is disabled (#2710)

* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user

* Fix multi-actions in PR page

* Change error message

* Fix comment update and delete functionality in PR
This commit is contained in:
Lauris BH 2017-10-16 10:55:43 +03:00 committed by GitHub
parent a75d5c72bb
commit c1b0c9e7c4
7 changed files with 68 additions and 66 deletions

View file

@ -21,10 +21,8 @@ func IssueWatch(c *context.Context) {
return
}
issueIndex := c.ParamsInt64("index")
issue, err := models.GetIssueByIndex(c.Repo.Repository.ID, issueIndex)
if err != nil {
c.Handle(http.StatusInternalServerError, "GetIssueByIndex", err)
issue := GetActionIssue(c)
if c.Written() {
return
}
@ -33,6 +31,6 @@ func IssueWatch(c *context.Context) {
return
}
url := fmt.Sprintf("%s/issues/%d", c.Repo.RepoLink, issueIndex)
url := fmt.Sprintf("%s/issues/%d", c.Repo.RepoLink, issue.Index)
c.Redirect(url, http.StatusSeeOther)
}