Skip to content
Snippets Groups Projects

fix: avoid fatal error if key entity is not there

1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
@@ -99,7 +99,10 @@ class PostgresProvider extends AiVdbProviderClientBase implements ContainerFacto
$token = $config->get(key: 'password');
$output['password'] = '';
if ($token) {
$output['password'] = $this->keyRepository->getKey(key_id: $token)->getKeyValue();
$key = $this->keyRepository->getKey(key_id: $token);
if ($key) {
$output['password'] = $key->getKeyValue();
}
}
if (!empty($this->configuration['password'])) {
$output['password'] = $this->configuration['password'];
Loading