Fix atom leak in AdminAPIController

This commit is contained in:
Egor Kislitsyn 2020-06-10 15:37:43 +04:00 committed by rinpatch
parent acf6393c87
commit a781ac6ca5

View file

@ -379,8 +379,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
filters filters
|> String.split(",") |> String.split(",")
|> Enum.filter(&Enum.member?(@filters, &1)) |> Enum.filter(&Enum.member?(@filters, &1))
|> Enum.map(&String.to_atom/1) |> Map.new(&{String.to_existing_atom(&1), true})
|> Map.new(&{&1, true})
end end
def right_add_multiple(%{assigns: %{user: admin}} = conn, %{ def right_add_multiple(%{assigns: %{user: admin}} = conn, %{