0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-30 17:14:31 +01:00

fix 500 error when view an issue which's milestone deleted ()

This commit is contained in:
Lunny Xiao 2017-08-12 10:15:30 +08:00 committed by GitHub
parent be29d5f7ad
commit 921d90fd8b

View file

@ -176,7 +176,7 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
if issue.Milestone == nil && issue.MilestoneID > 0 {
issue.Milestone, err = getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
if err != nil {
if err != nil && !IsErrMilestoneNotExist(err) {
return fmt.Errorf("getMilestoneByRepoID [repo_id: %d, milestone_id: %d]: %v", issue.RepoID, issue.MilestoneID, err)
}
}