mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix exception in query history for python 2.7. Fixes #4663
This commit is contained in:
committed by
Akshay Joshi
parent
e0c53e7d1d
commit
47f26cc377
@@ -37,4 +37,5 @@ Bug fixes
|
|||||||
| `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node.
|
| `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node.
|
||||||
| `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers.
|
| `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers.
|
||||||
| `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container.
|
| `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container.
|
||||||
|
| `Issue #4663 <https://redmine.postgresql.org/issues/4663>`_ - Fix exception in query history for python 2.7.
|
||||||
| `Issue #4674 <https://redmine.postgresql.org/issues/4674>`_ - Fix query tool launch error if user name contain html characters.
|
| `Issue #4674 <https://redmine.postgresql.org/issues/4674>`_ - Fix query tool launch error if user name contain html characters.
|
||||||
@@ -14,11 +14,12 @@ class QueryHistory:
|
|||||||
QueryHistoryModel.dbname == dbname) \
|
QueryHistoryModel.dbname == dbname) \
|
||||||
.all()
|
.all()
|
||||||
|
|
||||||
|
# In Python 2.7, rec.query_info has buffer data type. Cast it.
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': True,
|
'status': True,
|
||||||
'msg': '',
|
'msg': '',
|
||||||
'result': [rec.query_info for rec in result]
|
'result': [bytes(rec.query_info) for rec in list(result)]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user