diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 9c16ad2d..b252e059 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -56,7 +56,7 @@ end IO.puts "---- Generating users" for user_def <- resources["users"] do - %User{} + %User{role: user_def["role"]} |> User.creation_changeset(user_def) |> Repo.insert(on_conflict: :nothing) end diff --git a/priv/repo/seeds_development.exs b/priv/repo/seeds_development.exs index 96bfe592..9c1fbbc4 100644 --- a/priv/repo/seeds_development.exs +++ b/priv/repo/seeds_development.exs @@ -28,7 +28,7 @@ resources = IO.puts "---- Generating users" for user_def <- resources["users"] do - %User{} + %User{role: user_def["role"]} |> User.creation_changeset(user_def) |> Repo.insert(on_conflict: :nothing) end