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()
|
||||
|
|
|
|||
|
|
@ -187,9 +187,8 @@ export class PersonDetailComponent implements OnInit {
|
|||
filter.combination = FilterCombination.Or;
|
||||
filter.limitTo = 20;
|
||||
|
||||
// I might want to use roles$ to do all this
|
||||
allPeople.forEach(f => {
|
||||
filter.statements.push({comparison: FilterComparison.Contains, value: this.person!.id + '', field: f});
|
||||
roles.forEach(pr => {
|
||||
filter.statements.push({comparison: FilterComparison.Contains, value: this.person!.id + '', field: personRoleForFilterField(pr)});
|
||||
});
|
||||
|
||||
return filter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue