From 6a104afb330783ce0a58334bff28940b00eb4b54 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 21 May 2020 08:31:47 +0100 Subject: [PATCH] Fixed the issue when updating the issue status --- src/Ombi/Controllers/V1/IssuesController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Ombi/Controllers/V1/IssuesController.cs b/src/Ombi/Controllers/V1/IssuesController.cs index 98db2ebaf..e78e46c76 100644 --- a/src/Ombi/Controllers/V1/IssuesController.cs +++ b/src/Ombi/Controllers/V1/IssuesController.cs @@ -208,7 +208,7 @@ namespace Ombi.Controllers.V1 [HttpPost("comments")] public async Task AddComment([FromBody] NewIssueCommentViewModel comment) { - var user = await _userManager.Users.Where(x => User.Identity.Name.Equals(x.UserName, StringComparison.InvariantCultureIgnoreCase)) + var user = await _userManager.Users.Where(x => User.Identity.Name == x.UserName) .FirstOrDefaultAsync(); var issue = await _issues.GetAll().Include(x => x.UserReported).Include(x => x.IssueCategory).FirstOrDefaultAsync(x => x.Id == comment.IssueId); if (issue == null) @@ -278,7 +278,8 @@ namespace Ombi.Controllers.V1 [HttpPost("status")] public async Task UpdateStatus([FromBody] IssueStateViewModel model) { - var user = await _userManager.Users.Where(x => User.Identity.Name.Equals(x.UserName, StringComparison.InvariantCultureIgnoreCase)) + var username = User.Identity.Name.ToUpper(); + var user = await _userManager.Users.Where(x => username == x.NormalizedUserName) .FirstOrDefaultAsync(); var issue = await _issues.GetAll().Include(x => x.UserReported).Include(x => x.IssueCategory).FirstOrDefaultAsync(x => x.Id == model.IssueId); if (issue == null)