Skip to content

Commit

Permalink
Check if attachments object is empty string (elsa-workflows#3164)
Browse files Browse the repository at this point in the history
If attachments object is empty string, ignore and return from method.
  • Loading branch information
johnwc authored Jun 27, 2022
1 parent c35e3a4 commit b57b7ec
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ private async Task AddAttachmentsAsync(BodyBuilder bodyBuilder, CancellationToke

if (attachments != null)
{
if (attachments is string && string.IsNullOrWhiteSpace((string)attachments))
return;

var index = 0;
var attachmentObjects = InterpretAttachmentsModel(attachments);

Expand Down Expand Up @@ -206,4 +209,4 @@ private async Task<HttpResponseMessage> DownloadUrlAsync(Uri url)
return response;
}
}
}
}

0 comments on commit b57b7ec

Please sign in to comment.