Skip to content

Commit

Permalink
SQLAlchemy: properly quote identifier (Chainlit#1395)
Browse files Browse the repository at this point in the history
Fixes Chainlit#1394 which was introduced in Chainlit#1319.
  • Loading branch information
hayescode authored Oct 8, 2024
1 parent 2e9569b commit 0039137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/chainlit/data/sql_alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ async def _get_user_identifer_by_id(self, user_id: str) -> str:
async def _get_user_id_by_thread(self, thread_id: str) -> Optional[str]:
if self.show_logger:
logger.info(f"SQLAlchemy: _get_user_id_by_thread, thread_id={thread_id}")
query = "SELECT userId FROM threads WHERE id = :thread_id"
query = """SELECT "userId" FROM threads WHERE id = :thread_id"""
parameters = {"thread_id": thread_id}
result = await self.execute_sql(query=query, parameters=parameters)
if result:
Expand Down

0 comments on commit 0039137

Please sign in to comment.