File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
lib/private/TextProcessing Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,11 @@ public function scheduleTask(OCPTask $task): void {
221221 }
222222 $ task ->setStatus (OCPTask::STATUS_SCHEDULED );
223223 $ providers = $ this ->getPreferredProviders ($ task );
224- if (count ($ providers ) === 0 ) {
224+ $ equivalentTaskProcessingTypeAvailable = (
225+ isset (self ::$ taskProcessingCompatibleTaskTypes [$ task ->getType ()])
226+ && isset ($ this ->taskProcessingManager ->getAvailableTaskTypes ()[self ::$ taskProcessingCompatibleTaskTypes [$ task ->getType ()]])
227+ );
228+ if (count ($ providers ) === 0 && !$ equivalentTaskProcessingTypeAvailable ) {
225229 throw new PreConditionNotMetException ('No LanguageModel provider is installed that can handle this task ' );
226230 }
227231 [$ provider ,] = $ providers ;
You can’t perform that action at this time.
0 commit comments