Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

fix if else in referrer filter

Francis Caodbdbc90ee7b8
diff --git a/lib/prisma.ts b/lib/prisma.ts
index aa9efe741..50f26f75a 100644
--- a/lib/prisma.ts
+++ b/lib/prisma.ts
@@ -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}}}`);
}
}