Fix deleting an entire group. Also utilize Pleroma.ConfigDB.delete/1

This commit is contained in:
Mark Felder 2020-12-04 11:19:58 -06:00
parent 685e5c8509
commit 696d39c3dc
1 changed files with 4 additions and 2 deletions

View File

@ -334,8 +334,10 @@ defp delete_group(group) 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