Skip to content

Commit

Permalink
Fixing animals filter
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Nov 19, 2023
1 parent 32bc119 commit b673d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/AnimalPredictionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AnimalPredictionService extends BaseService<AnimalPrediction>{
const breed = await BreedService.getBreedByAITag(predictionViewList[i].breed);
if (breed && breed.id) {
let animals = await this.GetAnimalsByBreedPrediction(breed.id);
animals = animals.filter(x => x.predictions.find(x => x.idBreed == breed.id)?.percentage || 0 > 0.15);
animals = animals.filter(x => (x.predictions.find(x => x.idBreed == breed.id)?.percentage || 0) > 0.15);
const view = new AnimalView();
view.breed = breed;
view.animalList = animals.filter(x => !listAnimals.includes(x.id));
Expand Down

0 comments on commit b673d75

Please sign in to comment.