1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-25 01:12:30 +00:00

Fix some Dializer issue

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-09-26 10:29:37 +02:00
parent 530539c631
commit a37bab3b84
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -62,7 +62,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
Map.merge(map, %{actor: actor, id: id, inserted_at: inserted_at})
end
@spec transform_action_log(module(), atom(), ActionLog.t()) :: map()
@spec transform_action_log(module(), atom(), ActionLog.t()) :: map() | nil
defp transform_action_log(
Report,
:update,
@ -132,6 +132,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Admin do
}
end
defp transform_action_log(_, _, _), do: nil
# Changes are stored as %{"key" => "value"} so we need to convert them back as struct
@spec convert_changes_to_struct(module(), map()) :: struct()
defp convert_changes_to_struct(struct, %{"report_id" => _report_id} = changes) do