addListDetails was not optimized to build unique list of list owners
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
solves one of multiple problems related to #1188
This commit is contained in:
parent
92a87cfe4f
commit
d8b23ceb9f
|
@ -445,8 +445,12 @@ func addListDetails(s *xorm.Session, lists []*List, a web.Auth) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var ownerIDs []int64
|
var ownerIDs []int64
|
||||||
|
keys := make(map[int64]bool)
|
||||||
for _, l := range lists {
|
for _, l := range lists {
|
||||||
ownerIDs = append(ownerIDs, l.OwnerID)
|
if _, value := keys[l.OwnerID]; !value {
|
||||||
|
keys[l.OwnerID] = true
|
||||||
|
ownerIDs = append(ownerIDs, l.OwnerID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all list owners
|
// Get all list owners
|
||||||
|
|
Loading…
Reference in New Issue
Block a user