From 2fc690a783f5b702fad71da627aa616017727f56 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 7 Oct 2022 14:18:36 +0200 Subject: [PATCH] fix: make sure list subscriptions are set correctly when their namespace has a subscription already --- pkg/models/namespace.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/models/namespace.go b/pkg/models/namespace.go index 3da5f70385..d8c78847fd 100644 --- a/pkg/models/namespace.go +++ b/pkg/models/namespace.go @@ -198,6 +198,11 @@ func makeNamespaceSlice(namespaces map[int64]*NamespaceWithLists, userMap map[in n.Owner = userMap[n.OwnerID] n.Subscription = subscriptions[n.ID] all = append(all, n) + for _, l := range n.Lists { + if n.Subscription != nil && l.Subscription == nil { + l.Subscription = n.Subscription + } + } } sort.Slice(all, func(i, j int) bool { return all[i].ID < all[j].ID