From d6fc2ef2eeb2b8656bd9a71014452eb58f0b25d9 Mon Sep 17 00:00:00 2001 From: MauricioGarciaS <47052044+MauricioGarciaS@users.noreply.github.com> Date: Fri, 18 Nov 2022 10:59:18 +0100 Subject: [PATCH] Fixed error in signals.py --- ee/api/chalicelib/core/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/api/chalicelib/core/signals.py b/ee/api/chalicelib/core/signals.py index 1c8f76a62..7a2d9ebd2 100644 --- a/ee/api/chalicelib/core/signals.py +++ b/ee/api/chalicelib/core/signals.py @@ -9,8 +9,8 @@ def handle_frontend_signals(project_id: int, user_id: str, data: schemas_ee.Sign res = {'errors': 'query not executed'} insights_query = """INSERT INTO public.frontend_signals VALUES ({project_id}, {user_id}, {timestamp}, {action}, {source}, {category}, {data})""" with pg_client.PostgresClient() as conn: - query = conn.mogrify(insights_query, {project_id=project_id, user_id=user_id, timestamp=data['timestamp'], source=data['source'], - category=data['category'], data=json.dumps(data['data'])}) + query = conn.mogrify(insights_query, {project_id: project_id, user_id: user_id, timestamp: data['timestamp'], source: data['source'], + category: data['category'], data: json.dumps(data['data'])}) conn.execute(query) res = helper.dict_to_camel_case(conn.fetchone()) return res