Skip to content

Commit

Permalink
prevent duplicate sections being shown
Browse files Browse the repository at this point in the history
  • Loading branch information
o-fl0w committed Nov 15, 2023
1 parent 8c7938a commit d182c2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/sections/sections.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,15 @@ func build(ctx context.Context, stashClient graphql.Client, stimhubClient *stimh
var sections []section.Section

for _, ss := range sss {
outer:
for _, s := range ss {
if s.FilterId == "" {
continue
}
for _, x := range sections {
if s.FilterId == x.FilterId {
log.Ctx(ctx).Trace().Str("filterId", s.FilterId).Str("section", s.Name).Msg("Filter already added, skipping")
continue
continue outer
}
}

Expand Down

0 comments on commit d182c2c

Please sign in to comment.