From 0bd839f5ae04f76216cd83e6fb7f23fce42236e1 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 30 Aug 2024 09:59:58 +0200 Subject: [PATCH] fix(TextProcessing): Don't run taskProcessing if task type is not available Signed-off-by: Marcel Klehr Signed-off-by: Julien Veyssier --- lib/private/TextProcessing/Manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/TextProcessing/Manager.php b/lib/private/TextProcessing/Manager.php index 312efb29005..81a8f59c955 100644 --- a/lib/private/TextProcessing/Manager.php +++ b/lib/private/TextProcessing/Manager.php @@ -116,7 +116,7 @@ class Manager implements IManager { SummaryTaskType::class => TextToTextSummary::ID, TopicsTaskType::class => TextToTextTopics::ID, ]; - if (isset($taskProcessingCompatibleTaskTypes[$taskTypeClass])) { + if (isset($taskProcessingCompatibleTaskTypes[$taskTypeClass]) && isset($this->taskProcessingManager->getAvailableTaskTypes()[$taskProcessingCompatibleTaskTypes[$taskTypeClass]])) { try { $taskProcessingTaskTypeId = $taskProcessingCompatibleTaskTypes[$taskTypeClass]; $taskProcessingTask = new \OCP\TaskProcessing\Task( -- 2.39.5