From a7d59743d1674c580f57b602943b87bb7a4856a0 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 28 Oct 2022 10:22:02 +0200 Subject: [PATCH] feat(chalice): fixes --- api/chalicelib/core/telemetry.py | 4 ++-- ee/api/chalicelib/core/telemetry.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/chalicelib/core/telemetry.py b/api/chalicelib/core/telemetry.py index 50fdc3c11..2996ace3e 100644 --- a/api/chalicelib/core/telemetry.py +++ b/api/chalicelib/core/telemetry.py @@ -43,8 +43,8 @@ def compute(): def new_client(): with pg_client.PostgresClient() as cur: cur.execute( - f"""SELECT *, - (SELECT email FROM public.users WHERE role='owner' LIMIT 1) AS email + f"""SELECT *, openreplay_version() AS version_number, + (SELECT email FROM public.users WHERE role='owner' LIMIT 1) AS email FROM public.tenants LIMIT 1;""") data = cur.fetchone() diff --git a/ee/api/chalicelib/core/telemetry.py b/ee/api/chalicelib/core/telemetry.py index 889c1b8f6..f3ec7c904 100644 --- a/ee/api/chalicelib/core/telemetry.py +++ b/ee/api/chalicelib/core/telemetry.py @@ -65,7 +65,7 @@ def compute(): def new_client(tenant_id): with pg_client.PostgresClient() as cur: cur.execute( - cur.mogrify(f"""SELECT *, + cur.mogrify(f"""SELECT *, openreplay_version() AS version_number, (SELECT email FROM public.users WHERE tenant_id=%(tenant_id)s AND role='owner' LIMIT 1) AS email FROM public.tenants WHERE tenant_id=%(tenant_id)s