Fix deleting an entire group. Also utilize Pleroma.ConfigDB.delete/1
authorMark Felder <feld@FreeBSD.org>
Fri, 4 Dec 2020 17:19:58 +0000 (11:19 -0600)
committerMark Felder <feld@FreeBSD.org>
Fri, 4 Dec 2020 17:19:58 +0000 (11:19 -0600)
lib/mix/tasks/pleroma/config.ex

index 7ec791b36598dc3dbc14fce712d8322a38158865..00e7be6f44852f0ecc83358b176438716e51993b 100644 (file)
@@ -334,8 +334,10 @@ defmodule Mix.Tasks.Pleroma.Config do
         dump_group(group)
 
         group
-        |> ConfigDB.get_all_by_group()
-        |> Enum.each(&delete(&1, true))
+        |> Pleroma.ConfigDB.get_all_by_group()
+        |> Enum.each(fn config ->
+          Pleroma.ConfigDB.delete(%{group: config.group, key: config.key})
+        end)
       else
         _ -> shell_error("No settings in ConfigDB for #{inspect(group)}. Aborting.")
       end