From 0dde0d04cd803d967edc523a1c5c1e4ea807c6ae Mon Sep 17 00:00:00 2001 From: MauricioGarciaS <47052044+MauricioGarciaS@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:07:20 +0100 Subject: [PATCH] Added missing value in query string --- ee/api/chalicelib/core/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/signals.py b/ee/api/chalicelib/core/signals.py index d5be6859a..4ad1d640f 100644 --- a/ee/api/chalicelib/core/signals.py +++ b/ee/api/chalicelib/core/signals.py @@ -9,7 +9,7 @@ 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)s, %(user_id)s, %(timestamp)s, %(action)s, %(source)s, %(category)s, %(data)s)""" 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, + query = conn.mogrify(insights_query, {'project_id': project_id, 'user_id': user_id, 'timestamp': data.timestamp, 'action': data.action, 'source': data.source, 'category': data.category, 'data': json.dumps(data.data)}) conn.execute(query) res = helper.dict_to_camel_case(conn.fetchone())