Skip to content

Commit

Permalink
fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
klakhov committed Jun 22, 2023
1 parent 98cf03b commit cf91dcb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cvat-core/src/annotations-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ export default class Collection {
continue;
}

if (object.jobID && object.jobID !== filter?.jobID) {
if ((object.jobID && filter?.jobID) && object.jobID !== filter.jobID) {
continue;
}

Expand Down
12 changes: 5 additions & 7 deletions cvat-core/src/session-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,14 +640,12 @@ export function implementTask(Task) {
(frameFrom < _job.startFrame && frameTo > _job.stopFrame)
));

if (filters.notDeleted) {
for (const job of jobs) {
const result = await findFrame(
job.id, Math.max(frameFrom, job.startFrame), Math.min(frameTo, job.stopFrame), 1,
);
for (const job of jobs) {
const result = await findFrame(
job.id, Math.max(frameFrom, job.startFrame), Math.min(frameTo, job.stopFrame), filters,
);

if (result !== null) return result;
}
if (result !== null) return result;
}

return null;
Expand Down

0 comments on commit cf91dcb

Please sign in to comment.