Skip to content

Commit ca0b9a7

Browse files
committed
Fixing lookup of email recipients.
1 parent 7de86d9 commit ca0b9a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

eFormAPI/Plugins/Workflow.Pn/Workflow.Pn/Services/WorkflowCasesService/WorkflowCasesService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,12 @@ private async Task SendFileAsync(
904904
public async Task GenerateReportAndSendEmail(int languageId, string userName, WorkflowCase workflowCase, string solvedBy)
905905
{
906906
var emailRecipients = new List<string>();
907-
var emailRecipient = await _baseDbContext.EmailRecipients.SingleOrDefaultAsync(x => x.Name.Replace(" ", "") ==
907+
var emailRecipient = await _baseDbContext.EmailRecipients.SingleOrDefaultAsync(x => x.Name.ToLower().Replace(" ", "").Trim() ==
908908
userName
909909
.Replace("Mobil", "")
910-
.Replace("Tablet", ""));
910+
.Replace("Tablet", "").ToLower().Replace(" ", "").Trim());
911911
emailRecipients.Add(emailRecipient.Email);
912-
var solvedByemailRecipient = await _baseDbContext.EmailRecipients.SingleOrDefaultAsync(x => x.Name == solvedBy.Replace(" ", ""));
912+
var solvedByemailRecipient = await _baseDbContext.EmailRecipients.SingleOrDefaultAsync(x => x.Name.ToLower().Replace(" ", "").Trim() == solvedBy.ToLower().Replace(" ", "").Trim());
913913
if (solvedByemailRecipient != null)
914914
{
915915
emailRecipients.Add(solvedByemailRecipient.Email);

0 commit comments

Comments
 (0)