]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(TextProcessing): Don't run taskProcessing if task type is not available
authorMarcel Klehr <mklehr@gmx.net>
Fri, 30 Aug 2024 07:59:58 +0000 (09:59 +0200)
committerJulien Veyssier <julien-nc@posteo.net>
Fri, 30 Aug 2024 12:06:15 +0000 (14:06 +0200)
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
lib/private/TextProcessing/Manager.php

index 312efb29005acb55a1171c08f4c8d62a4c77abba..81a8f59c9550199781526eda8dbe30a2c42294cc 100644 (file)
@@ -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(