Add a filter to exclude raw data points when calculating yearly digests.

This commit is contained in:
Eugene Burmakin 2026-01-03 13:27:10 +01:00
parent c3ed22bb5e
commit 7313863674

View file

@ -122,6 +122,7 @@ module Users
end_of_year = start_of_year.end_of_year
user.points
.without_raw_data
.where('timestamp >= ? AND timestamp <= ?', start_of_year.to_i, end_of_year.to_i)
.where.not(country_name: [nil, ''])
.select(:country_name, :timestamp)