Fix EAN, only change xml if a valid value was found

This commit is contained in:
Jonathan Jenne 2022-07-04 11:49:37 +02:00
parent 05dab8d045
commit 916e12cae7
2 changed files with 2 additions and 1 deletions

View File

@ -413,6 +413,7 @@ Namespace Winline
' we dont throw here, but leave the original value in case of a failure.
' Throw New Exceptions.MissingAttributeException("EAN")
Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name)
Continue For
End If
oNode.InnerText = oEAN

View File

@ -572,7 +572,7 @@ Namespace Winline
FROM [{pMandator.Database}].[dbo].[v021]
WHERE [c011] = '{pArticleNumber}'
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oEAN As String = Database.GetScalarValue(oSQL)
Dim oEAN As String = Utils.NotNull(Database.GetScalarValue(oSQL), Nothing)
' EAN not found in this Mandator, continue to next one
If oEAN Is Nothing Then