Fix populateRunAutomationDetails for null environments

This commit is contained in:
David Verdeguer 2021-04-16 07:51:29 +02:00
parent de611b2de3
commit 0ece0d074b
3 changed files with 5 additions and 7 deletions

View file

@ -53,11 +53,10 @@ export function populateRunAutomationDetails(
let automationID = `${analysis_key}/`;
// the id has to be deterministic so we sort the fields
if (environment !== undefined) {
console.log(environment);
if (environment !== undefined && environment !== "null") {
const environmentObject = JSON.parse(environment);
for (const entry of Object.entries(environmentObject).sort()) {
automationID += `${entry[0]}:${entry[1]}/`; //automationID + entry[0] + ':' + entry[1] + '/';
automationID += `${entry[0]}:${entry[1]}/`;
}
}