Yuki Takei 9 месяцев назад
Родитель
Сommit
1b49faa7e0
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      apps/app/src/features/openai/server/routes/edit/index.ts

+ 1 - 1
apps/app/src/features/openai/server/routes/edit/index.ts

@@ -216,7 +216,7 @@ export const postMessageToEditHandlersFactory: PostMessageHandlersFactory = (cro
         }
       }
 
-      const aiAssistant = aiAssistantId != null ? await AiAssistantModel.findById(aiAssistantId) : undefined;
+      const aiAssistant = aiAssistantId != null ? await AiAssistantModel.findOne({ _id: { $eq: aiAssistantId } }) : undefined;
 
       // Initialize SSE helper and stream processor
       const sseHelper = new SseHelper(res);