Shun Miyazawa 1 год назад
Родитель
Сommit
0124f31fd1

+ 1 - 1
apps/app/src/features/openai/server/services/delete-ai-assistant.ts

@@ -33,7 +33,7 @@ export const deleteAiAssistant = async(ownerId: string, aiAssistantId: string):
 };
 
 export const deleteUserAiAssistant = async(user: IUserHasId): Promise<void> => {
-  if (!isAiEnabled()) {
+  if (isAiEnabled()) {
     const aiAssistants = await AiAssistantModel.find({ owner: user });
     for await (const aiAssistant of aiAssistants) {
       try {