Skip to content

Commit

Permalink
fix if else in referrer filter
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscao633 committed Aug 4, 2023
1 parent 0fd57aa commit dbdbc90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/prisma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ function getFilterQuery(filters = {}): string {
const filter = filters[key];

if (filter !== undefined && !IGNORED_FILTERS.includes(key)) {
const column = FILTER_COLUMNS[key] || key;
arr.push(`and ${column}={{${key}}}`);

if (key === 'referrer') {
arr.push(
'and (website_event.referrer_domain != {{websiteDomain}} or website_event.referrer_domain is null)',
);
} else {
const column = FILTER_COLUMNS[key] || key;
arr.push(`and ${column}={{${key}}}`);
}
}

Expand Down

0 comments on commit dbdbc90

Please sign in to comment.