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/test/plausible_web/controllers/api
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
..
external_stats_controller Fix returning more pageviews with a visit property filter (#2612) 4 years ago
stats_controller Reject unknown imported cities from queries (#2675) 4 years ago
external_controller_test.exs Replace Geolix with Locus (#2362) 4 years ago
external_sites_controller_test.exs Some changes to the "site taken" copy (#2647) 4 years ago
internal_controller_test.exs Run tests in async mode where applicable (#2542) 4 years ago
paddle_controller_test.exs Run tests in async mode where applicable (#2542) 4 years ago