[ML] Fixes check to determine whether telemetry is enabled. (#33975)
This commit is contained in:
parent
4fac5fc899
commit
2882d2853f
|
@ -120,9 +120,7 @@ describe('ml_telemetry', () => {
|
|||
}
|
||||
return {
|
||||
attributes: {
|
||||
telemetry: {
|
||||
enabled: telemetryEnabled,
|
||||
},
|
||||
enabled: telemetryEnabled,
|
||||
},
|
||||
};
|
||||
case 'ml-telemetry':
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue