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()
257
257
var searchString = arguments [ 0 ] == null ? "" : arguments [ 0 ] . ToString ( ) ;
258
258
DataObjectMapping dataObjectMapping = JsonSerializer . Deserialize < DataObjectMapping > ( context . Value . ToString ( ) ) ;
259
259
260
- var dataItemExists = dataObjectMapping . DataItemMappings . Select ( x => x . TargetDataItem . Name == searchString ) . FirstOrDefault ( ) ;
260
+ var dataItemExists = dataObjectMapping . DataItemMappings . Where ( x => x . TargetDataItem . Name == searchString ) . FirstOrDefault ( ) ;
261
261
262
- if ( dataItemExists )
262
+ if ( dataItemExists != null )
263
263
{
264
264
// Regular block
265
265
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
25
25
26
26
{{ #targetDataItemExists " FIRST_NAME" }} FIRST_NAME exists{{ else }} FIRST_NAME does not exist{{ /targetDataItemExists }}
27
27
{{ #targetDataItemExists " NAME" }} NAME exists{{ else }} NAME does not exist{{ /targetDataItemExists }}
28
+ {{ #targetDataItemExists " DATE_OF_BIRTH" }} NAME exists{{ else }} NAME does not exist{{ /targetDataItemExists }}
28
29
29
30
-- End of mapping
30
31
{{ /each }}
You can’t perform that action at this time.
0 commit comments