diff --git a/internal/database/org.go b/internal/database/org.go index ce1e565d6..572c4ec0a 100644 --- a/internal/database/org.go +++ b/internal/database/org.go @@ -412,7 +412,7 @@ func RemoveOrgUser(orgID, userID int64) error { } // Delete all repository accesses and unwatch them. - repoIDs := make([]int64, len(repos)) + repoIDs := make([]int64, 0, len(repos)) for i := range repos { repoIDs = append(repoIDs, repos[i].ID) if err = watchRepo(sess, user.ID, repos[i].ID, false); err != nil {