LT-115: Fixing issue with location for not found baseline

This commit is contained in:
Bruno Alves de Faria 2017-01-06 07:46:24 -02:00
parent c581b0fd2c
commit 3065f16e42

View File

@ -53,7 +53,10 @@ class MeasurementApi {
});
if (baselineGroupEntry) {
const tool = this.tools[baselineGroupEntry.toolId];
location = tool.findOne({ measurementNumber }).location;
const found = tool.findOne({ measurementNumber });
if (found) {
location = found.location;
}
}
// Reflect the entry in the tool group collection