aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing
diff options
context:
space:
mode:
authorJulien Veyssier <julien-nc@posteo.net>2024-07-17 15:23:18 +0200
committerJulien Veyssier <julien-nc@posteo.net>2024-07-17 15:24:19 +0200
commit183726a299356e3ced6ad3b54ffe5f6d5273c896 (patch)
tree8d025dc38b6f25946a4cd5b5ed5938f6eae8a96a /lib/private/TaskProcessing
parentd37dd4b9a96d4316aa95d2e0ba0a0ec451de4ea7 (diff)
downloadnextcloud-server-183726a299356e3ced6ad3b54ffe5f6d5273c896.tar.gz
nextcloud-server-183726a299356e3ced6ad3b54ffe5f6d5273c896.zip
feat(settings/admin/ai): fix provider list not being declared
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Diffstat (limited to 'lib/private/TaskProcessing')
-rw-r--r--lib/private/TaskProcessing/Manager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index 834ca488033..f720776a239 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -501,8 +501,8 @@ class Manager implements IManager {
public function getPreferredProvider(string $taskType) {
try {
$preferences = json_decode($this->config->getAppValue('core', 'ai.taskprocessing_provider_preferences', 'null'), associative: true, flags: JSON_THROW_ON_ERROR);
+ $providers = $this->getProviders();
if (isset($preferences[$taskType])) {
- $providers = $this->getProviders();
$provider = current(array_values(array_filter($providers, fn ($provider) => $provider->getId() === $preferences[$taskType])));
if ($provider !== false) {
return $provider;