From: Sadposter Date: Mon, 2 Sep 2019 11:31:23 +0000 (+0100) Subject: use atom key for fields X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=d0f07e55d28d25684130cb1090d0bdbb48807548;p=akkoma use atom key for fields --- diff --git a/lib/pleroma/user/info.ex b/lib/pleroma/user/info.ex index ca1282d02..151e025de 100644 --- a/lib/pleroma/user/info.ex +++ b/lib/pleroma/user/info.ex @@ -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, [