mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 09:50:41 +00:00
fix 500 error when view an issue which's milestone deleted (#2297)
This commit is contained in:
parent
be29d5f7ad
commit
921d90fd8b
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ func (issue *Issue) loadAttributes(e Engine) (err error) {
|
||||||
|
|
||||||
if issue.Milestone == nil && issue.MilestoneID > 0 {
|
if issue.Milestone == nil && issue.MilestoneID > 0 {
|
||||||
issue.Milestone, err = getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
|
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)
|
return fmt.Errorf("getMilestoneByRepoID [repo_id: %d, milestone_id: %d]: %v", issue.RepoID, issue.MilestoneID, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue