fix: make sure list subscriptions are set correctly when their namespace has a subscription already
This commit is contained in:
parent
bcb286a7f0
commit
2fc690a783
1 changed files with 5 additions and 0 deletions
|
@ -198,6 +198,11 @@ func makeNamespaceSlice(namespaces map[int64]*NamespaceWithLists, userMap map[in
|
||||||
n.Owner = userMap[n.OwnerID]
|
n.Owner = userMap[n.OwnerID]
|
||||||
n.Subscription = subscriptions[n.ID]
|
n.Subscription = subscriptions[n.ID]
|
||||||
all = append(all, n)
|
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 {
|
sort.Slice(all, func(i, j int) bool {
|
||||||
return all[i].ID < all[j].ID
|
return all[i].ID < all[j].ID
|
||||||
|
|
Loading…
Reference in a new issue