You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible
Vini Brasil 535874be6f
Reject unknown imported cities from queries (#2675)
* Reject unknown imported cities from queries

This commit fixes a bug where the city report returned `N/A` entries.
The functions that build imported data queries were using SQL
`COALESCE`, assuming city data is `NULL` when unknown, when actually its
unknown value is `0`.

This commit addresses the problem using SQL `NULLIF` combined with the
previous `COALESCE` call. With this change both `0` and `NULL` are
treated as unknown.

Since 1cb07efe6d cities can be `NULL`, but
previously we saved `0` as unknown.

Closes #1960

* Add entry to CHANGELOG

* Ignore cyclomatic complexity Credo check
4 years ago
..
auth Handle duplicate invitations gracefully (#2323) 4 years ago
billing Wrap paddle actions with DB transactions (#2558) 4 years ago
event Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
goal Trim goals when creating and retrieving from the DB (#2382) 4 years ago
google Save city name when importing from GA (#2608) 4 years ago
helpers improve transfer ownership error message (#2651) 4 years ago
imported Save city name when importing from GA (#2608) 4 years ago
ingestion Replace Geolix with Locus (#2362) 4 years ago
sentry Use finch in sentry client (#1996) 4 years ago
session Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
site Delay stats deletions (#2632) 4 years ago
stats Reject unknown imported cities from queries (#2675) 4 years ago
telemetry Gatekeep ingestion pipeline (#2472) 4 years ago
application.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
clickhouse_repo.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
geo.ex Stop logging invalid_address errors from Locus (#2604) 4 years ago
goals.ex Improve test coverage (#2392) 4 years ago
http_client.ex Trace external HTTP requests (#2419) 4 years ago
ingest_repo.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
mailer.ex Do not report hard bounce e-mail errors to Sentry (#2361) 4 years ago
mailer_test.exs Do not report hard bounce e-mail errors to Sentry (#2361) 4 years ago
open_telemetry.ex Remove ingestion requests and Oban queries from OTEL (#2543) 4 years ago
prom_ex.ex Split Clickhouse pools into Read-Only and Read/Write (dedicated to writes) (#2661) 4 years ago
purge.ex Delay stats deletions (#2632) 4 years ago
repo.ex Pagination for sites listing (#994) 6 years ago
site.ex Some changes to the "site taken" copy (#2647) 4 years ago
sites.ex Some changes to the "site taken" copy (#2647) 4 years ago
themes.ex Adds dark mode to entire dashboard (#467) 6 years ago
timezones.ex Fix timezone list when time changes (#2268) 4 years ago