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
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
..
CSVs Replace empty OS/screen size/Browser with `(not set)` in UI/API/exports (#2646) 4 years ago
api Reject unknown imported cities from queries (#2675) 4 years ago
site improve transfer ownership error message (#2651) 4 years ago
admin_auth_controller_test.exs improve first launch experience for self-hosters (#2357) 4 years ago
auth_controller_test.exs Cascade delete sent_renewal_notifications table when user is deleted (#2549) 4 years ago
billing_controller_test.exs Run tests in async mode where applicable (#2542) 4 years ago
error_report_controller_test.exs Prevent error reports from being sent with short feedback (#2635) 4 years ago
invitation_controller_test.exs fix ownership transfer when is_selfhost=true (#2455) 4 years ago
site_controller_test.exs Some changes to the "site taken" copy (#2647) 4 years ago
stats_controller_test.exs Some changes to the "locked site" copy (#2615) 4 years ago
unsubscribe_controller_test.exs Run tests in async mode where applicable (#2542) 4 years ago