fix: linting + tests
This commit is contained in:
parent
bc4bcd0089
commit
d9b659e5ea
4 changed files with 12 additions and 5 deletions
|
|
@ -166,7 +166,7 @@ case Accounts.User
|
|||
# User already exists (e.g., via OIDC) - assign admin role
|
||||
existing_admin_user
|
||||
|> Ash.Changeset.for_update(:update, %{})
|
||||
|> Ash.Changeset.manage_relationship(:role, admin_role, type: :replace)
|
||||
|> Ash.Changeset.manage_relationship(:role, admin_role, type: :append_and_remove)
|
||||
|> Ash.update!()
|
||||
|
||||
{:ok, nil} ->
|
||||
|
|
@ -177,7 +177,7 @@ case Accounts.User
|
|||
|> then(fn user ->
|
||||
user
|
||||
|> Ash.Changeset.for_update(:update, %{})
|
||||
|> Ash.Changeset.manage_relationship(:role, admin_role, type: :replace)
|
||||
|> Ash.Changeset.manage_relationship(:role, admin_role, type: :append_and_remove)
|
||||
|> Ash.update!()
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue