We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4dbaa8 commit b237fa2Copy full SHA for b237fa2
src/adapters/postgres/cohort-adapter.ts
@@ -803,11 +803,17 @@ export class PostgresCohortService {
803
count = totalCount;
804
805
let cohortIds = data.map(cohortId => cohortId.cohortId);
806
+ let whereClauseCondition: any = {
807
+ cohortId: In(cohortIds),
808
+ tenantId: filters.tenantId,
809
+ };
810
+
811
+ if (filters.status && filters.status.length > 0) {
812
+ whereClauseCondition.status = In(filters.status);
813
+ }
814
815
let cohortAllData = await this.cohortRepository.find({
- where: {
- cohortId: In(cohortIds),
- tenantId : filters.tenantId
- },
816
+ where: whereClauseCondition,
817
});
818
819
for (let data of cohortAllData) {
0 commit comments