Fix linkify ConfigDB migration
This commit is contained in:
parent
5b1eeb06d8
commit
7045db5a50
|
@ -23,7 +23,7 @@ defp move_config(%{} = old, %{} = new) do
|
||||||
|
|
||||||
defp maybe_get_params() do
|
defp maybe_get_params() do
|
||||||
with %ConfigDB{value: opts} <- ConfigDB.get_by_params(@autolinker_path),
|
with %ConfigDB{value: opts} <- ConfigDB.get_by_params(@autolinker_path),
|
||||||
%{} = opts <- transform_opts(opts),
|
opts <- transform_opts(opts),
|
||||||
%{} = linkify_params <- Map.put(@linkify_path, :value, opts) do
|
%{} = linkify_params <- Map.put(@linkify_path, :value, opts) do
|
||||||
{:ok, {@autolinker_path, linkify_params}}
|
{:ok, {@autolinker_path, linkify_params}}
|
||||||
end
|
end
|
||||||
|
@ -33,5 +33,6 @@ defp transform_opts(opts) when is_list(opts) do
|
||||||
opts
|
opts
|
||||||
|> Enum.into(%{})
|
|> Enum.into(%{})
|
||||||
|> Map.take(@compat_opts)
|
|> Map.take(@compat_opts)
|
||||||
|
|> Map.to_list()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue