Skip to content

Commit

Permalink
fix: feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSmallenbroek committed Sep 27, 2024
1 parent ccfa983 commit 4a85b0e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ export class RegistrationsPaginationService {
queryBuilder = this.addPaymentFilter(queryBuilder, query);

// Replacing the filter on referenceId is needed in specific cases where the referenceId only consists of numbers.
// The includes('$') === false is needed to check if the query doesn't contain an '$ilike' operator.
// The !query.filter.referenceId.includes('$') is needed to check if the query doesn't contain an operator like '$ilike'.
// If the filter has a '$' we don't need to replace the filter
if (query?.filter?.referenceId?.includes('$') === false) {
if (query?.filter?.referenceId && !query.filter.referenceId.includes('$')) {
queryBuilder.andWhere('CAST("referenceId" AS TEXT) = :referenceId', {
referenceId: query.filter.referenceId,
});
Expand Down

0 comments on commit 4a85b0e

Please sign in to comment.