Merge remote-tracking branch 'origin/api-v1.8.2' into dev

This commit is contained in:
Taha Yassine Kraiem 2022-10-28 10:22:21 +02:00
commit b62ce29166
2 changed files with 3 additions and 3 deletions

View file

@ -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()

View file

@ -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