Fix Dialyzer opaque type warning in register_user_with_organization
- Create changeset before Multi pipeline for better type inference - Pass changeset directly to Multi.insert instead of using function form - Resolves call_without_opaque warning at line 97
This commit is contained in:
parent
d345d7df30
commit
7cdb93ef31
1 changed files with 3 additions and 3 deletions
|
|
@ -94,10 +94,10 @@ defmodule Towerops.Accounts do
|
|||
|
||||
"""
|
||||
def register_user_with_organization(attrs) do
|
||||
user_changeset = User.email_changeset(%User{}, attrs)
|
||||
|
||||
Ecto.Multi.new()
|
||||
|> Ecto.Multi.insert(:user, fn _ ->
|
||||
User.email_changeset(%User{}, attrs)
|
||||
end)
|
||||
|> Ecto.Multi.insert(:user, user_changeset)
|
||||
|> Ecto.Multi.run(:organization, fn _repo, %{user: user} ->
|
||||
org_name = attrs["organization_name"] || "Personal"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue