Skip to content

Commit

Permalink
Fix: Exclude rejected registrations from duplicate check AB#27472
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSmallenbroek committed Apr 19, 2024
1 parent edef4ef commit 383b5fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/121-service/src/metrics/metrics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ export class MetricsService {
.innerJoin('registration_data.registration', 'registration')
.andWhere(whereOptions)
.andWhere('registration.programId = :programId', { programId })
.andWhere('registration."registrationStatus" != :status', {
status: RegistrationStatusEnum.rejected,
})
.having('COUNT(registration_data.value) > 1')
.andHaving('COUNT(DISTINCT "registrationId") > 1')
.groupBy('registration_data.value');
Expand Down

0 comments on commit 383b5fb

Please sign in to comment.