use atom key for fields

This commit is contained in:
Sadposter 2019-09-02 12:31:23 +01:00
parent 05c935c396
commit d0f07e55d2

View file

@ -242,7 +242,12 @@ defmodule Pleroma.User.Info do
end
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
|> cast(params, [