Skip to content

Commit 83b0c17

Browse files
committed
fix: when no AI setting has been set, make sure the selected text processing provider is the same as the one that will be used
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 5782313 commit 83b0c17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/settings/lib/Settings/Admin/ArtificialIntelligence.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ public function getForm() {
8383
'name' => $provider->getName(),
8484
'taskType' => $provider->getTaskType(),
8585
];
86-
$textProcessingSettings[$provider->getTaskType()] = $provider::class;
86+
if (!isset($textProcessingSettings[$provider->getTaskType()])) {
87+
$textProcessingSettings[$provider->getTaskType()] = $provider::class;
88+
}
8789
}
8890
$textProcessingTaskTypes = [];
8991
foreach ($textProcessingSettings as $taskTypeClass => $providerClass) {

0 commit comments

Comments
 (0)