1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-27 13:39:19 -05:00

make sure labels are actually returned (#6053)

This commit is contained in:
Lanre Adelowo 2019-02-13 16:45:19 +01:00 committed by techknowlogick
parent 23414ac2a1
commit f2256d9881

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()