File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
ClassLibrary/DataWarehouseAutomation Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -257,9 +257,9 @@ public static void RegisterHandleBarsHelpers()
257257 var searchString = arguments [ 0 ] == null ? "" : arguments [ 0 ] . ToString ( ) ;
258258 DataObjectMapping dataObjectMapping = JsonSerializer . Deserialize < DataObjectMapping > ( context . Value . ToString ( ) ) ;
259259
260- var dataItemExists = dataObjectMapping . DataItemMappings . Select ( x => x . TargetDataItem . Name == searchString ) . FirstOrDefault ( ) ;
260+ var dataItemExists = dataObjectMapping . DataItemMappings . Where ( x => x . TargetDataItem . Name == searchString ) . FirstOrDefault ( ) ;
261261
262- if ( dataItemExists )
262+ if ( dataItemExists != null )
263263 {
264264 // Regular block
265265 options . Template ( output , context ) ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ Found a data item mapping from {{sourceDataItems.0.name}} to {{targetDataItem.na
2525
2626{{ #targetDataItemExists " FIRST_NAME" }} FIRST_NAME exists{{ else }} FIRST_NAME does not exist{{ /targetDataItemExists }}
2727{{ #targetDataItemExists " NAME" }} NAME exists{{ else }} NAME does not exist{{ /targetDataItemExists }}
28+ {{ #targetDataItemExists " DATE_OF_BIRTH" }} NAME exists{{ else }} NAME does not exist{{ /targetDataItemExists }}
2829
2930-- End of mapping
3031{{ /each }}
You can’t perform that action at this time.
0 commit comments