mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
Fix for roles not being applied to default users
This commit is contained in:
parent
e33be9c8de
commit
fd1f62b294
2 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ end
|
||||||
|
|
||||||
IO.puts "---- Generating users"
|
IO.puts "---- Generating users"
|
||||||
for user_def <- resources["users"] do
|
for user_def <- resources["users"] do
|
||||||
%User{}
|
%User{role: user_def["role"]}
|
||||||
|> User.creation_changeset(user_def)
|
|> User.creation_changeset(user_def)
|
||||||
|> Repo.insert(on_conflict: :nothing)
|
|> Repo.insert(on_conflict: :nothing)
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@ resources =
|
||||||
|
|
||||||
IO.puts "---- Generating users"
|
IO.puts "---- Generating users"
|
||||||
for user_def <- resources["users"] do
|
for user_def <- resources["users"] do
|
||||||
%User{}
|
%User{role: user_def["role"]}
|
||||||
|> User.creation_changeset(user_def)
|
|> User.creation_changeset(user_def)
|
||||||
|> Repo.insert(on_conflict: :nothing)
|
|> Repo.insert(on_conflict: :nothing)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue