diff --git a/lib/kmxgit/repository_manager.ex b/lib/kmxgit/repository_manager.ex
index b154719..8e010bc 100644
--- a/lib/kmxgit/repository_manager.ex
+++ b/lib/kmxgit/repository_manager.ex
@@ -23,6 +23,7 @@ defmodule Kmxgit.RepositoryManager do
|> preload([members: :slug,
organisation: [:slug, users: :slug],
user: :slug])
+ |> Repo.all()
end
def list_repositories(params \\ %IndexParams{}) do
diff --git a/lib/kmxgit/user_manager.ex b/lib/kmxgit/user_manager.ex
index 1df8014..760a207 100644
--- a/lib/kmxgit/user_manager.ex
+++ b/lib/kmxgit/user_manager.ex
@@ -15,6 +15,8 @@ defmodule Kmxgit.UserManager do
from(u in User)
|> join(:inner, [u], s in Slug, on: s.user_id == u.id)
|> order_by([u, s], fragment("lower(?)", s.slug))
+ |> preload(:slug)
+ |> Repo.all()
end
def list_users(params \\ %IndexParams{}) do