Skip to content

Commit 0607c56

Browse files
committed
fix
1 parent 7e0ee32 commit 0607c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_sqlite/cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,8 @@ pysqlite_cursor_execute_json_impl(pysqlite_Cursor *self, PyObject *sql,
10221022
return PyErr_NoMemory();
10231023
}
10241024

1025-
// Add column name as string
1026-
PyObject *colname_obj = PyUnicode_FromString(colname);
1025+
// Add column name as quoted string literal for json_object keys
1026+
PyObject *colname_obj = PyUnicode_FromFormat("'%s'", colname);
10271027
if (!colname_obj) {
10281028
Py_DECREF(column_list);
10291029
return NULL;

0 commit comments

Comments
 (0)