Skip to content

Commit

Permalink
Chore: add search limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Benmuiruri committed Apr 2, 2024
1 parent 1e9c334 commit e4ae604
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ import { TranslateService } from '@mm-services/translate.service';
providedIn: 'root'
})
export class ContactViewModelGeneratorService {
LIMIT_SELECT_ALL_REPORTS = 500;

constructor(
private lineageModelGeneratorService:LineageModelGeneratorService,
private dbService:DbService,
Expand Down Expand Up @@ -309,7 +311,7 @@ export class ContactViewModelGeneratorService {
});
const filter = { subjectIds: _flattenDeep(subjectIds) };
return this.searchService
.search('reports', filter, { include_docs: true })
.search('reports', filter, { include_docs: true, limit: this.LIMIT_SELECT_ALL_REPORTS })
.then((reports) => {
reports.forEach((report) => {
report.valid = !report.errors || !report.errors.length;
Expand Down

0 comments on commit e4ae604

Please sign in to comment.