If use mrf_subchain, cannot get config from admin api
Used example of https://git.pleroma.social/pleroma/pleroma/blob/develop/docs/config.md#mrf_subchain
Log
[info] GET /api/pleroma/admin/config
[error] Internal server error: %Protocol.UndefinedError{description: "", protocol: Enumerable, value: ~r/https:\/\/example.com/s}
[info] Sent 500 in 5ms
[info] Converted error Protocol.UndefinedError to 500 response
[error] #PID<0.26154.0> running Pleroma.Web.Endpoint (connection #PID<0.26153.0>, stream id 1) terminated
Server: .
Request: GET /api/pleroma/admin/config
** (exit) an exception was raised:
** (Protocol.UndefinedError) protocol Enumerable not implemented for ~r/https:\/\/example.com/s of type Regex (a struct). This protocol is implemented for the following type(s): Ecto.Adapters.SQL.Stream, Postgrex.Stream, Floki.HTMLTree, DBConnection.Stream, DBConnection.PrepareStream, Timex.Interval, List, HashSet, IO.Stream, Function, Stream, Date.Range, Map, HashDict, GenEvent.Stream, MapSet, File.Stream, Range
(elixir) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir) lib/enum.ex:141: Enumerable.reduce/3
(elixir) lib/enum.ex:3023: Enum.reduce/3
(pleroma) lib/pleroma/web/admin_api/config.ex:94: Pleroma.Web.AdminAPI.Config.do_convert/1
(pleroma) lib/pleroma/web/admin_api/config.ex:94: anonymous fn/2 in Pleroma.Web.AdminAPI.Config.do_convert/1
(stdlib) maps.erl:232: :maps.fold_1/3
(pleroma) lib/pleroma/web/admin_api/config.ex:94: Pleroma.Web.AdminAPI.Config.do_convert/1
(pleroma) lib/pleroma/web/admin_api/config.ex:90: anonymous fn/2 in Pleroma.Web.AdminAPI.Config.do_convert/1
Edited by kPherox