Fix empty filters after clicking on know for, don't filter on roles for known for Fixes #3858
This commit is contained in:
parent
145d74cd6f
commit
5c8b124b70
2 changed files with 3 additions and 5 deletions
|
|
@ -315,10 +315,9 @@ public class PersonRepository : IPersonRepository
|
|||
|
||||
public async Task<IEnumerable<SeriesDto>> GetSeriesKnownFor(int personId)
|
||||
{
|
||||
List<PersonRole> notValidRoles = [PersonRole.Location, PersonRole.Team, PersonRole.Other, PersonRole.Publisher, PersonRole.Translator];
|
||||
return await _context.Person
|
||||
.Where(p => p.Id == personId)
|
||||
.SelectMany(p => p.SeriesMetadataPeople.Where(smp => !notValidRoles.Contains(smp.Role)))
|
||||
.SelectMany(p => p.SeriesMetadataPeople)
|
||||
.Select(smp => smp.SeriesMetadata)
|
||||
.Select(sm => sm.Series)
|
||||
.Distinct()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue