Solved SignalSchema not subscriptable
This commit is contained in:
parent
fd0d57cd7b
commit
fe2c514a0c
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)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'],
|
||||
'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