Phase 2.5 cleanup: 15-item backlog burndown #3
+5
-4
@@ -236,11 +236,12 @@ async def post_turn(
|
|||||||
guest_bot = None
|
guest_bot = None
|
||||||
guest_bot_id = chat.get("guest_bot_id")
|
guest_bot_id = chat.get("guest_bot_id")
|
||||||
if guest_bot_id is not None:
|
if guest_bot_id is not None:
|
||||||
|
# T47's bot_reset cascade clears guest_bot_id from any chat that
|
||||||
|
# referenced the deleted bot, so by the time we read it here it's
|
||||||
|
# either None or a live bot id. The previous defensive
|
||||||
|
# degrade-to-1:1 block (T44) was rendered dead by T47 and removed
|
||||||
|
# in T74.4 — get_bot now returns a real row.
|
||||||
guest_bot = get_bot(conn, guest_bot_id)
|
guest_bot = get_bot(conn, guest_bot_id)
|
||||||
# If the chat references a deleted guest we degrade to single-bot
|
|
||||||
# rather than 404 — the chat is still usable as a 1:1.
|
|
||||||
if guest_bot is None:
|
|
||||||
guest_bot_id = None
|
|
||||||
|
|
||||||
settings = request.app.state.settings
|
settings = request.app.state.settings
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user