[ML] Fixes check to determine whether telemetry is enabled. (#33975)

This commit is contained in:
Walter Rafelsberger 2019-03-27 19:43:01 +01:00 committed by GitHub
parent 4fac5fc899
commit 2882d2853f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -120,9 +120,7 @@ describe('ml_telemetry', () => {
}
return {
attributes: {
telemetry: {
enabled: telemetryEnabled,
},
enabled: telemetryEnabled,
},
};
case 'ml-telemetry':

View file

@ -47,7 +47,7 @@ export async function incrementFileDataVisualizerIndexCreationCount(server: Serv
try {
const { attributes } = await savedObjectsClient.get('telemetry', 'telemetry');
if (attributes.telemetry.enabled === false) {
if (attributes.enabled === false) {
return;
}
} catch (error) {