mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
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:
parent
22943972c2
commit
ecb5572e69
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue