Skip to content

Commit

Permalink
Merge pull request #48 from SSWConsulting/fix-duplicate-rules-on-widget
Browse files Browse the repository at this point in the history
πŸ› Fix Query for Not Showing Same Rules on Widget
  • Loading branch information
Aibono1225 authored Jan 5, 2024
2 parents 946cbcd + 2d5799d commit bdbf958
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SSW.Rules.AzFuncs/Functions/Widget/GetLatestRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public async Task<HttpResponseData> Run(
var filteredRules = rules
.Where(r => string.IsNullOrEmpty(githubUsername) || r.GitHubUsername == githubUsername ||
r.CreatedBy == githubUsername || r.UpdatedBy == githubUsername)
.GroupBy(r => r.RuleGuid)
.Select(group => group.First())
.OrderByDescending(r => r.UpdatedAt)
.Skip(skip)
.Take(take);
Expand Down

0 comments on commit bdbf958

Please sign in to comment.