Fix for chapter repeats.

This commit is contained in:
2026-02-10 16:23:33 -05:00
parent 848d187f4b
commit 7fdc2ea3de
4 changed files with 6 additions and 5 deletions

View File

@@ -950,7 +950,7 @@ def rewrite_chapter_content(bp, manuscript, chapter_num, instruction, folder):
utils.log("WRITER", f"Rewriting Ch {chapter_num} with instruction: {instruction}")
# Find target chapter and previous context
target_chap = next((c for c in manuscript if c['num'] == chapter_num), None)
target_chap = next((c for c in manuscript if str(c.get('num')) == str(chapter_num)), None)
if not target_chap: return None
prev_text = ""