fix(backend): remove inaccessible podcast references when cloning chats

When a podcast can't be cloned (not READY), remove the podcast_id from
the cloned message to prevent 403 errors when users try to access it.
This commit is contained in:
CREDO23 2026-01-28 19:25:15 +02:00
parent 22943972c2
commit ecb5572e69

View file

@ -291,6 +291,9 @@ async def complete_clone_content(
if old_podcast_id and old_podcast_id in podcast_id_map:
result_data["podcast_id"] = podcast_id_map[old_podcast_id]
elif old_podcast_id:
# Podcast couldn't be cloned (not ready), remove reference
result_data.pop("podcast_id", None)
new_message = NewChatMessage(
thread_id=target_thread.id,