feat: enhance logging for character updates and voice cache management
This commit is contained in:
@@ -745,11 +745,13 @@ async def update_character(
|
||||
|
||||
if (data.instruct is not None or data.gender is not None) and char.voice_design_id:
|
||||
voice_design = crud.get_voice_design(db, char.voice_design_id, current_user.id)
|
||||
logger.info(f"update_character: char_id={char_id}, voice_design_id={char.voice_design_id}, found={voice_design is not None}")
|
||||
if voice_design:
|
||||
if data.instruct is not None:
|
||||
voice_design.instruct = data.instruct
|
||||
voice_design.voice_cache_id = None
|
||||
db.commit()
|
||||
logger.info(f"update_character: cleared voice_cache_id for design {voice_design.id}")
|
||||
|
||||
return _char_to_response(char, db)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user