jack 1 week ago
parent
commit
a985d99f8e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/services/message/message.py

+ 2 - 0
app/services/message/message.py

@@ -12,6 +12,7 @@ from app.services.thread.thread import ThreadService
 from app.models.token_relation import RelationType
 from app.providers.auth_provider import auth_policy
 from app.schemas.common import DeleteResponse
+from sqlalchemy.orm.attributes import flag_modified
 
 
 class MessageService:
@@ -107,6 +108,7 @@ class MessageService:
                 "file_ids"
             ] = thread_file_ids
             setattr(thread, "tool_resources", thread.tool_resources)
+            flag_modified(thread, "tool_resources")
             # thread.tool_resources = thread.tool_resources
             print(thread)
             session.add(thread)