Fixed error in signals.py
This commit is contained in:
parent
d085b3583d
commit
d6fc2ef2ee
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue