diff --git a/docs/en_US/release_notes_4_13.rst b/docs/en_US/release_notes_4_13.rst index 8d90e49f7..ae5ece70c 100644 --- a/docs/en_US/release_notes_4_13.rst +++ b/docs/en_US/release_notes_4_13.rst @@ -37,4 +37,5 @@ Bug fixes | `Issue #4644 `_ - Fix length and precision enable/disable issue when changing the data type for Domain node. | `Issue #4650 `_ - Fix SQL tab issue for Views. It's a regression of compound triggers. | `Issue #4657 `_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container. +| `Issue #4663 `_ - Fix exception in query history for python 2.7. | `Issue #4674 `_ - Fix query tool launch error if user name contain html characters. \ No newline at end of file diff --git a/web/pgadmin/tools/sqleditor/utils/query_history.py b/web/pgadmin/tools/sqleditor/utils/query_history.py index 6019aba3b..41c7b974a 100644 --- a/web/pgadmin/tools/sqleditor/utils/query_history.py +++ b/web/pgadmin/tools/sqleditor/utils/query_history.py @@ -14,11 +14,12 @@ class QueryHistory: QueryHistoryModel.dbname == dbname) \ .all() + # In Python 2.7, rec.query_info has buffer data type. Cast it. return make_json_response( data={ 'status': True, 'msg': '', - 'result': [rec.query_info for rec in result] + 'result': [bytes(rec.query_info) for rec in list(result)] } )