Correção para a variável documentType somente ser verificada se ela existir.

This commit is contained in:
Adriano Serighelli 2025-06-05 16:25:18 -03:00
parent e4be58d728
commit c549dc8615

View File

@ -118,7 +118,10 @@ namespace Webhook_4docs
JsonElement DadosJson = JsonDocument.Parse(root.ToString()).RootElement;
if (root.Get("documentType").ToString().ToLower() != string.Empty)
{
if (root.Get("documentType")?.ToString().ToLower() != "nota_fiscal") { return; }
}
Fatura fatura = new(fatura_ID, JsonBody);
bool completed = false;