Index: ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb =================================================================== diff -u -r1785 -r1790 --- ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb (.../CacheMapper.vb) (revision 1785) +++ ActiviteitenOpvolging/ProductiePitching/mappers/CacheMapper.vb (.../CacheMapper.vb) (revision 1790) @@ -170,14 +170,7 @@ If (.QuantityToProduce > 0) Then stateValue = ActivityStateEnumMapper.GetActivityStateFromLetter(ExtractItemFromDataReader(Of Char)(dr, $"Status_{i}")) If (employee Is Nothing) Then - employee = New Employee() - With employee - .FirstName = "VH" - .LastName = "Automation" - .PersonelNumber = 0 - .Number = 0 - .Initials = "" - End With + employee = DummyEmployee() End If End If .State = ConvertEnumValueToActivityState(stateValue, activity, employee) @@ -190,6 +183,18 @@ Return activities End Function + Private Function DummyEmployee() As Employee + Dim dummy As Employee = New Employee() + With dummy + .FirstName = "VH" + .LastName = "Automation" + .PersonelNumber = 0 + .Number = 0 + .Initials = "" + End With + Return dummy + End Function + ''' ''' Get the correct amount of activities. '''