diff --git a/lib/metadataTypes/Automation.js b/lib/metadataTypes/Automation.js index 4a3120e07..d68105298 100644 --- a/lib/metadataTypes/Automation.js +++ b/lib/metadataTypes/Automation.js @@ -495,12 +495,12 @@ class Automation extends MetadataType { // schedule const results = await this.retrieve(undefined, undefined, undefined, key); if (Object.keys(results.metadata).length) { - for (const key of Object.keys(results.metadata)) { - if (this.#isValidSchedule(results.metadata[key])) { - metadataMap[key] = results.metadata[key]; + for (const resultKey of Object.keys(results.metadata)) { + if (this.#isValidSchedule(results.metadata[resultKey])) { + metadataMap[resultKey] = results.metadata[resultKey]; } else { Util.logger.error( - ` - skipping ${this.definition.type} ${results.metadata[key].name}: no valid schedule settings found.` + ` - skipping ${this.definition.type} ${results.metadata[resultKey].name}: no valid schedule settings found.` ); } }