mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 04:21:36 +01:00
Merge pull request #8733 from ywk253100/190819_label
Fix bug of listing tags filtered by label
This commit is contained in:
commit
92fa01d6cd
@ -584,7 +584,12 @@ func (ra *RepositoryAPI) GetTags() {
|
||||
}
|
||||
labeledTags := map[string]struct{}{}
|
||||
for _, rl := range rls {
|
||||
labeledTags[strings.Split(rl.ResourceName, ":")[1]] = struct{}{}
|
||||
strs := strings.SplitN(rl.ResourceName, ":", 2)
|
||||
// the "rls" may contain images which don't belong to the repository
|
||||
if strs[0] != repoName {
|
||||
continue
|
||||
}
|
||||
labeledTags[strs[1]] = struct{}{}
|
||||
}
|
||||
ts := []string{}
|
||||
for _, tag := range tags {
|
||||
|
Loading…
Reference in New Issue
Block a user