Fixed an issue where an object of type bytes is not JSON serializable when saving the data from the query tool.

pull/5863/head
Akshay Joshi 2023-02-15 15:20:18 +05:30
parent 5e0daccf76
commit a0b8676f61
1 changed files with 2 additions and 0 deletions

View File

@ -1987,6 +1987,8 @@ Failed to reset the connection to the server due to following error:
if parameters:
mogrified_sql = cursor.mogrify(query, parameters)
if isinstance(mogrified_sql, bytes):
mogrified_sql = mogrified_sql.decode(self.python_encoding)
return mogrified_sql
else:
return query