diff options
Diffstat (limited to 'internal/db/issue.go')
-rw-r--r-- | internal/db/issue.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/db/issue.go b/internal/db/issue.go index fdcabf9b..9fafd4f0 100644 --- a/internal/db/issue.go +++ b/internal/db/issue.go @@ -315,9 +315,7 @@ func (issue *Issue) clearLabels(e *xorm.Session) (err error) { // NOTE: issue.removeLabel slices issue.Labels, so we need to create another slice to be unaffected. labels := make([]*Label, len(issue.Labels)) - for i := range issue.Labels { - labels[i] = issue.Labels[i] - } + copy(labels, issue.Labels) for i := range labels { if err = issue.removeLabel(e, labels[i]); err != nil { return fmt.Errorf("removeLabel: %v", err) |