Skip to content

Commit

Permalink
Allow empty city geonames in exports (#4079)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslandoga committed May 9, 2024
1 parent 84ed798 commit b1c1361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plausible/exports.ex
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ defmodule Plausible.Exports do
defp export_locations_q(site_id, timezone, date_range) do
from s in sampled("sessions_v2"),
where: ^export_filter(site_id, date_range),
where: s.city_geoname_id != 0 and s.country_code != "\0\0" and s.country_code != "ZZ",
group_by: [selected_as(:date), s.country_code, selected_as(:region), s.city_geoname_id],
where: s.country_code != "\0\0" and s.country_code != "ZZ",
group_by: [selected_as(:date), s.country_code, s.subdivision1_code, s.city_geoname_id],
order_by: selected_as(:date),
select: [
date(s.timestamp, ^timezone),
Expand Down

0 comments on commit b1c1361

Please sign in to comment.