analytics/test/plausible_web
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
2023-02-15 07:35:35 -03:00
..
controllers Reject unknown imported cities from queries (#2675) 2023-02-15 07:35:35 -03:00
plugs Run tests in async mode where applicable (#2542) 2022-12-26 10:20:29 -03:00
views remove redundant test 2022-11-10 15:55:33 +02:00
captcha_test.exs Google APIs integration improvements (#2358) 2022-10-24 09:34:02 +02:00
email_test.exs add tests for base_email template 2022-11-09 19:56:46 +02:00