Merge pull request #7 from derpibooru/seedfix

Fix for roles not being applied to default users
This commit is contained in:
Luna D 2019-12-20 09:18:19 +01:00 committed by GitHub
commit 35c4d9962c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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