1 defmodule Pleroma.Repo.Migrations.FixMalformedFormatterConfig do
5 @config_path %{group: :pleroma, key: Pleroma.Formatter}
8 with %ConfigDB{value: %{} = opts} <- ConfigDB.get_by_params(@config_path),
9 fixed_opts <- Map.to_list(opts) do
10 fix_config(fixed_opts)
16 defp fix_config(fixed_opts) when is_list(fixed_opts) do
18 ConfigDB.update_or_create(%{
20 key: Pleroma.Formatter,