importzugferdfiles: fix conversion error
This commit is contained in:
@@ -288,12 +288,16 @@ Public Class ImportZUGFeRDFiles
|
||||
ToDictionary(Function(Item) Item.Key,
|
||||
Function(Item) Item.Value)
|
||||
|
||||
_logger.Debug("Found {0} default properties.", oDefaultProperties.Count)
|
||||
|
||||
' PropertyMap items with `IsGrouped = True` are grouped by group scope
|
||||
Dim oGroupedProperties = args.PropertyMap.
|
||||
Where(Function(Item) Item.Value.IsGrouped = True).
|
||||
ToLookup(Function(Item) Item.Value.GroupScope, ' Lookup key is group scope
|
||||
Function(Item) Item)
|
||||
|
||||
_logger.Debug("Found {0} properties grouped in {1} group(s)", args.PropertyMap.Count - oDefaultProperties.Count, oGroupedProperties.Count)
|
||||
|
||||
' Iterate through groups to get group scope and group items
|
||||
For Each oGroup In oGroupedProperties
|
||||
Dim oGroupScope = oGroup.Key
|
||||
@@ -355,7 +359,10 @@ Public Class ImportZUGFeRDFiles
|
||||
|
||||
' Iterate through default properties
|
||||
For Each Item As KeyValuePair(Of String, XmlItemProperty) In oDefaultProperties
|
||||
Dim oPropertyValue As String = PropertyValues.GetPropValue(oDocument, Item.Key)
|
||||
Dim oPropertyValueList As List(Of Object) = PropertyValues.GetPropValue(oDocument, Item.Key)
|
||||
Dim oPropertyValue = oPropertyValueList.
|
||||
DefaultIfEmpty(New List(Of Object) From {Nothing}).
|
||||
First()
|
||||
Dim oPropertyDescription As String = Item.Value.Description
|
||||
|
||||
If String.IsNullOrEmpty(oPropertyValue) Then
|
||||
|
||||
Reference in New Issue
Block a user