1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.FixMalformedFormatterConfig do
9 @config_path %{group: :pleroma, key: Pleroma.Formatter}
12 with %ConfigDB{value: %{} = opts} <- ConfigDB.get_by_params(@config_path),
13 fixed_opts <- Map.to_list(opts) do
14 fix_config(fixed_opts)
20 defp fix_config(fixed_opts) when is_list(fixed_opts) do
22 ConfigDB.update_or_create(%{
24 key: Pleroma.Formatter,