summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-05-18 02:52:01 +0200
committerMax Magorsch <arzano@gentoo.org>2020-05-18 02:52:01 +0200
commit4ffea19d6578ba1b9dbded0fc3388e863f8d0012 (patch)
tree1603003d89f6b4ef68181218213bb90e54d87177
parentFix duplicate global useflags (diff)
downloadsoko-4ffea19d6578ba1b9dbded0fc3388e863f8d0012.tar.gz
soko-4ffea19d6578ba1b9dbded0fc3388e863f8d0012.tar.bz2
soko-4ffea19d6578ba1b9dbded0fc3388e863f8d0012.zip
Filter duplicate useflags by name not by id
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r--pkg/app/handler/packages/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/app/handler/packages/utils.go b/pkg/app/handler/packages/utils.go
index 3ea0cd1..13958c2 100644
--- a/pkg/app/handler/packages/utils.go
+++ b/pkg/app/handler/packages/utils.go
@@ -389,7 +389,7 @@ func sortVersionsDesc(versions []*models.Version) {
// given userflag. Otherwise false will be returned.
func containsUseflag(useflag models.Useflag, useflags []models.Useflag) bool {
for _, flag := range useflags {
- if useflag.Id == flag.Id {
+ if useflag.Name == flag.Name {
return true
}
}