From 9914217ec083f2cf123d92761f0628b17e882143 Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Tue, 19 Nov 2024 15:42:28 +0200 Subject: [PATCH] Update MdocHelpers to set isOptional to nil in RequestItem initialization --- Sources/MdocDataTransfer18013/MdocHelpers.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/MdocDataTransfer18013/MdocHelpers.swift b/Sources/MdocDataTransfer18013/MdocHelpers.swift index 9d2b601..d8397a4 100644 --- a/Sources/MdocDataTransfer18013/MdocHelpers.swift +++ b/Sources/MdocDataTransfer18013/MdocHelpers.swift @@ -176,7 +176,7 @@ public class MdocHelpers { } if itemsToAdd.count > 0 { nsItemsToAdd[reqNamespace] = itemsToAdd - validReqItemsNsDict[reqNamespace] = itemsToAdd.map { RequestItem(elementIdentifier: $0.elementIdentifier, intentToRetain: docReq?.itemsRequest.requestNameSpaces.nameSpaces[reqNamespace]?.dataElements[$0.elementIdentifier] ?? false, isOptional: false) } + validReqItemsNsDict[reqNamespace] = itemsToAdd.map { RequestItem(elementIdentifier: $0.elementIdentifier, intentToRetain: docReq?.itemsRequest.requestNameSpaces.nameSpaces[reqNamespace]?.dataElements[$0.elementIdentifier], isOptional: nil) } } let errorItemsSet = itemsReqSet.subtracting(itemsSet) if errorItemsSet.count > 0 {