* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed table of errors-per-domain with 0 results
This commit is contained in:
Kraiem Taha Yassine 2024-08-16 11:57:31 +02:00 committed by GitHub
parent 3641083bba
commit 1b83e77fd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1731,7 +1731,7 @@ def get_errors_per_domains(project_id, limit, page, startTimestamp=TimeUTC.now(d
**__get_constraint_values(args)}
with pg_client.PostgresClient() as cur:
pg_query = f"""SELECT SUM(errors_count) AS count,
pg_query = f"""SELECT COALESCE(SUM(errors_count),0)::INT AS count,
COUNT(raw.domain) AS total,
jsonb_agg(raw) FILTER ( WHERE rn > %(limit_s)s
AND rn <= %(limit_e)s ) AS values
@ -1750,6 +1750,7 @@ def get_errors_per_domains(project_id, limit, page, startTimestamp=TimeUTC.now(d
cur.execute(pg_query)
row = cur.fetchone()
if row:
row["values"] = row["values"] or []
for r in row["values"]:
r.pop("rn")