mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 04:49:33 -07:00
fix(issues): #4540 Fix issues being merged for items bearing the same name
Fix issues being merged for items bearing the same name
This commit is contained in:
commit
490e78f2e5
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ namespace Ombi.Core.Engine.V2
|
||||||
public async Task<IEnumerable<IssuesSummaryModel>> GetIssues(int position, int take, IssueStatus status, CancellationToken token)
|
public async Task<IEnumerable<IssuesSummaryModel>> GetIssues(int position, int take, IssueStatus status, CancellationToken token)
|
||||||
{
|
{
|
||||||
var issues = await _issues.GetAll().Where(x => x.Status == status && x.ProviderId != null).Skip(position).Take(take).OrderBy(x => x.Title).ToListAsync(token);
|
var issues = await _issues.GetAll().Where(x => x.Status == status && x.ProviderId != null).Skip(position).Take(take).OrderBy(x => x.Title).ToListAsync(token);
|
||||||
var grouped = issues.GroupBy(x => x.Title, (key, g) => new { Title = key, Issues = g });
|
var grouped = issues.GroupBy(x => new { x.Title, x.ProviderId }, (key, g) => new { key = key, Issues = g });
|
||||||
|
|
||||||
var model = new List<IssuesSummaryModel>();
|
var model = new List<IssuesSummaryModel>();
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ namespace Ombi.Core.Engine.V2
|
||||||
model.Add(new IssuesSummaryModel
|
model.Add(new IssuesSummaryModel
|
||||||
{
|
{
|
||||||
Count = group.Issues.Count(),
|
Count = group.Issues.Count(),
|
||||||
Title = group.Title,
|
Title = group.key.Title,
|
||||||
ProviderId = group.Issues.FirstOrDefault()?.ProviderId
|
ProviderId = group.key.ProviderId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue