Skip to content

Commit

Permalink
fix: check for first number in status to determine if file is trained…
Browse files Browse the repository at this point in the history
… or untrained
  • Loading branch information
jakowenko committed Sep 3, 2021
1 parent 809d5f3 commit 125f96e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/views/Train.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ export default {
try {
const ids = $this.matches.selected.map((obj) => obj.id);
const trained = $this.matches.selected.filter(
(obj) => obj.results.filter((res) => res.result.status === 200).length,
(obj) => obj.results.filter((res) => res.result.status.toString().charAt(0) === '2').length,
);
const untrained = $this.matches.selected.filter(
(obj) => !obj.results.length || obj.results.filter((res) => res.result.status !== 200).length,
(obj) =>
!obj.results.length ||
obj.results.filter((res) => res.result.status.toString().charAt(0) !== '2').length,
);
const names = [...new Set(trained.map((obj) => obj.name))];
let message = '';
Expand Down

0 comments on commit 125f96e

Please sign in to comment.