This commit is contained in:
Jan Prochazka 2022-06-23 08:48:27 +02:00
parent 1e5a740a52
commit cd65fa16ed
2 changed files with 8 additions and 4 deletions

View File

@ -166,9 +166,11 @@ module.exports = {
list_meta: true,
async list() {
return portalConnections && !platformInfo.allowShellConnection
? portalConnections.map(maskConnection)
: this.datastore.find();
if (portalConnections) {
if (platformInfo.allowShellConnection) return portalConnections;
return portalConnections.map(maskConnection);
}
return this.datastore.find();
},
test_meta: true,

View File

@ -16,7 +16,9 @@ function requireEngineDriver(connection) {
if (engine.includes('@')) {
const [shortName, packageName] = engine.split('@');
const plugin = requirePlugin(packageName);
return plugin.drivers.find(x => x.engine == engine);
if (plugin.drivers) {
return plugin.drivers.find(x => x.engine == engine);
}
}
throw new Error(`Could not find engine driver ${engine}`);
}