fix: A1-2 delete translation files from disk when parent post is deleted

This commit is contained in:
hugo committed 2026-05-28 18:47:27 +02:00
1 parent 82ce445c44
commit e2c92cb90d
3 files changed
+41 -1

No files matched your search

+3
View File
@@ -309,8 +309,11 @@ defmodule BDS.Posts do
select: pm.media_id
)
{:ok, translations} = Translations.list_post_translations(post.id)
case Repo.delete(post) do
{:ok, deleted_post} ->
Enum.each(translations, &FileSync.delete_translation_file/1)
delete_post_file(deleted_post)
Embeddings.remove_post(deleted_post.id)
PostLinks.delete_post_links(deleted_post.id)