use atom key for fields

This commit is contained in:
Sadposter 2019-09-02 12:31:23 +01:00
parent 05c935c396
commit d0f07e55d2
1 changed files with 6 additions and 1 deletions

View File

@ -242,7 +242,12 @@ def set_keys(info, keys) do
end end
def remote_user_creation(info, params) do def remote_user_creation(info, params) do
params = Map.put(params, "fields", Enum.map(params["fields"], &truncate_field/1)) params =
if Map.has_key?(params, :fields) do
Map.put(params, :fields, Enum.map(params[:fields], &truncate_field/1))
else
params
end
info info
|> cast(params, [ |> cast(params, [