Skip to content

Commit dfd4f45

Browse files
authored
Merge pull request #242 from ADAPT/develop
Merge to master for release
2 parents 95db2d5 + a22c648 commit dfd4f45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ISOv4Plugin/Mappers/LoggedDataMappers/Import/WorkingDataMapper.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ private NumericWorkingData CreateProductIndexWorkingData(int deviceElementUseId)
217217
private void UpdateCondensedWorkingDatas(List<ISOEnumeratedMeter> condensedWorkingDatas, ISODataLogValue dlv, DeviceElementUse deviceElementUse, List<DeviceElementUse> pendingDeviceElementUses, DeviceHierarchyElement isoDeviceElementHierarchy)
218218
{
219219
ISODeviceElement isoDeviceElement = TaskDataMapper.DeviceElementHierarchies.GetISODeviceElementFromID(dlv.DeviceElementIdRef);
220+
if (isoDeviceElement == null)
221+
{
222+
// If no device element found for the log value, nothing more to do here
223+
return;
224+
}
225+
220226
List<ISODeviceElement> isoSectionElements = isoDeviceElement.ChildDeviceElements.Where(d => d.DeviceElementType == ISOEnumerations.ISODeviceElementType.Section).ToList();
221227
foreach (var subElement in isoDeviceElement.ChildDeviceElements)
222228
{

0 commit comments

Comments
 (0)