Skip to content

Commit

Permalink
Fix wrong milestone in webhook message (#11596)
Browse files Browse the repository at this point in the history
Fixes #11295

Signed-off-by: Gary Kim [email protected]
  • Loading branch information
gary-kim authored May 24, 2020
1 parent 788b8b1 commit 5c55793
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (issue *Issue) loadReactions(e Engine) (err error) {
}

func (issue *Issue) loadMilestone(e Engine) (err error) {
if issue.Milestone == nil && issue.MilestoneID > 0 {
if (issue.Milestone == nil || issue.Milestone.ID != issue.MilestoneID) && issue.MilestoneID > 0 {
issue.Milestone, err = getMilestoneByRepoID(e, issue.RepoID, issue.MilestoneID)
if err != nil && !IsErrMilestoneNotExist(err) {
return fmt.Errorf("getMilestoneByRepoID [repo_id: %d, milestone_id: %d]: %v", issue.RepoID, issue.MilestoneID, err)
Expand Down

0 comments on commit 5c55793

Please sign in to comment.