Skip to content

Commit 6642286

Browse files
committed
load milestone and return it on IssueEdit via API
1 parent 6442205 commit 6642286

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

routers/api/v1/repo/issue.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,11 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) {
542542
// Refetch from database to assign some automatic values
543543
issue, err = models.GetIssueByID(issue.ID)
544544
if err != nil {
545-
ctx.Error(http.StatusInternalServerError, "GetIssueByID", err)
545+
ctx.InternalServerError(err)
546+
return
547+
}
548+
if err = issue.LoadMilestone(); err != nil {
549+
ctx.InternalServerError(err)
546550
return
547551
}
548552
ctx.JSON(http.StatusCreated, issue.APIFormat())

0 commit comments

Comments
 (0)