         number: i,
         project_id: 1,
         user_id: 1,
-        task_list_id: 1
+        task_list_id: Enum.random([1, 2, 3, 4])
       })
       |> Repo.insert!
     end

alias CodeCorps.{Category, Organization, OrganizationMembership, Project, ProjectCategory, ProjectSkill, Repo, Role, Skill, Task, User}

# Users

users = [
  %{
    username: "adminstrator",
    email: "admin@example.org",
    password: "password",
    admin: true
  },
  %{
    username: "testuser",
    email: "test@example.com",
    password: "test123",
    admin: false
  },
]

cond do

    IO.puts "Users detected, aborting user seed."
  true ->
    Enum.each(users, fn user ->
      result =
        %User{}
        |> User.registration_changeset(user)
        |> Repo.insert!

      result
      |> User.update_changeset(user)
      |> Repo.update!
    end)
end

