diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-02-13 16:45:19 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-02-13 10:45:19 -0500 |
commit | f2256d988132c973dc12b3b62adc15964d910e88 (patch) | |
tree | 5efeb1279ee02fe353b1250013bedbde3f246ea0 /routers/api/v1/repo/issue_label.go | |
parent | 23414ac2a1d83f91ff47c5d8bbedebe709b1f408 (diff) | |
download | gitea-f2256d988132c973dc12b3b62adc15964d910e88.tar.gz gitea-f2256d988132c973dc12b3b62adc15964d910e88.zip |
make sure labels are actually returned (#6053)
Diffstat (limited to 'routers/api/v1/repo/issue_label.go')
-rw-r--r-- | routers/api/v1/repo/issue_label.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index 715dd0ed77..d496f5bde6 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -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() |