Reassign ids for criteria when we clone conditions

This commit is contained in:
Joshi 2020-04-02 10:45:37 -07:00
parent 063a6c0e51
commit f96dfcc942

View File

@ -141,7 +141,9 @@ export default class ConditionManager extends EventEmitter {
}
cloneCondition(conditionConfiguration, index) {
this.createAndSaveCondition(index, JSON.parse(JSON.stringify(conditionConfiguration)));
let clonedConfig = JSON.parse(JSON.stringify(conditionConfiguration));
clonedConfig.configuration.criteria.forEach((criterion) => criterion.id = uuid());
this.createAndSaveCondition(index, clonedConfig);
}
createAndSaveCondition(index, conditionConfiguration) {