@@ -441,47 +441,52 @@ List<T> azureObjects
441441 {
442442 var field = listFields . FirstOrDefault ( f => f . Id == kvp . Key ) ;
443443
444- foreach ( var azureObject in azureObjects )
444+ if ( field ? . Id == _settings . Onspring . UsersStatusFieldId )
445445 {
446- if ( azureObject is null )
446+ continue ;
447+ }
448+
449+ foreach ( var azureObject in azureObjects )
447450 {
448- continue ;
449- }
451+ if ( azureObject is null )
452+ {
453+ continue ;
454+ }
450455
451- var propertyValue = azureObject
452- . GetType ( )
453- . GetProperty (
454- kvp . Value ,
455- BindingFlags . IgnoreCase | BindingFlags . Public | BindingFlags . Instance
456- )
457- ? . GetValue ( azureObject ) ;
456+ var propertyValue = azureObject
457+ . GetType ( )
458+ . GetProperty (
459+ kvp . Value ,
460+ BindingFlags . IgnoreCase | BindingFlags . Public | BindingFlags . Instance
461+ )
462+ ? . GetValue ( azureObject ) ;
458463
459- var possibleNewListValues = new List < string ? > ( ) ;
464+ var possibleNewListValues = new List < string ? > ( ) ;
460465
461- if ( propertyValue is null )
462- {
463- continue ;
464- }
466+ if ( propertyValue is null )
467+ {
468+ continue ;
469+ }
465470
466- if ( propertyValue is List < string > propertyValueList )
467- {
468- possibleNewListValues . AddRange ( propertyValueList ) ;
469- }
470- else
471- {
472- var propertyValueString = propertyValue . ToString ( ) ;
471+ if ( propertyValue is List < string > propertyValueList )
472+ {
473+ possibleNewListValues . AddRange ( propertyValueList ) ;
474+ }
475+ else
476+ {
477+ var propertyValueString = propertyValue . ToString ( ) ;
473478
474- possibleNewListValues . Add ( propertyValueString ) ;
475- }
479+ possibleNewListValues . Add ( propertyValueString ) ;
480+ }
476481
477- foreach ( var possibleNewListValue in possibleNewListValues )
478- {
479- if ( TryGetNewListValue ( field , possibleNewListValue , out var newListValue ) )
482+ foreach ( var possibleNewListValue in possibleNewListValues )
480483 {
481- newListValues . Add ( newListValue ) ;
484+ if ( TryGetNewListValue ( field , possibleNewListValue , out var newListValue ) )
485+ {
486+ newListValues . Add ( newListValue ) ;
487+ }
482488 }
483489 }
484- }
485490 }
486491
487492 newListValues = [ .. newListValues . DistinctBy ( kvp => kvp . Value . ToLower ( CultureInfo . InvariantCulture ) ) ] ;
@@ -514,7 +519,6 @@ internal static bool TryGetNewListValue(
514519 out KeyValuePair < int , string > newListValue
515520 )
516521 {
517-
518522 if (
519523 possibleNewListValue is null ||
520524 listField is null
0 commit comments