summaryrefslogtreecommitdiffstats
path: root/models/repo/repo_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/repo_list.go')
-rw-r--r--models/repo/repo_list.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go
index cc524a417e..0cd0a3c8e3 100644
--- a/models/repo/repo_list.go
+++ b/models/repo/repo_list.go
@@ -68,10 +68,10 @@ func (repos RepositoryList) loadAttributes(ctx context.Context) error {
return nil
}
- set := make(map[int64]struct{})
+ set := make(container.Set[int64])
repoIDs := make([]int64, len(repos))
for i := range repos {
- set[repos[i].OwnerID] = struct{}{}
+ set.Add(repos[i].OwnerID)
repoIDs[i] = repos[i].ID
}
@@ -79,7 +79,7 @@ func (repos RepositoryList) loadAttributes(ctx context.Context) error {
users := make(map[int64]*user_model.User, len(set))
if err := db.GetEngine(ctx).
Where("id > 0").
- In("id", container.KeysInt64(set)).
+ In("id", set.Values()).
Find(&users); err != nil {
return fmt.Errorf("find users: %v", err)
}