Browse Source

make sure labels are actually returned (#6053)

for-closed-social
Lanre Adelowo 5 years ago
committed by techknowlogick
parent
commit
f2256d9881
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      routers/api/v1/repo/issue_label.go

+ 5
- 0
routers/api/v1/repo/issue_label.go View File

@ -51,6 +51,11 @@ func ListIssueLabels(ctx *context.APIContext) {
return
}
if err := issue.LoadAttributes(); err != nil {
ctx.Error(500, "LoadAttributes", err)
return
}
apiLabels := make([]*api.Label, len(issue.Labels))
for i := range issue.Labels {
apiLabels[i] = issue.Labels[i].APIFormat()

Loading…
Cancel
Save