From f4cba74bf641b3ccda0af7c8338144133d7f18d6 Mon Sep 17 00:00:00 2001 From: Khushboo Vashi Date: Mon, 25 Nov 2024 14:40:26 +0530 Subject: [PATCH] Fixed an issue where querying a foreign table gives the error 'ForeignTableCommand' object has no attribute 'auto_commit'. #7384 --- docs/en_US/release_notes_8_14.rst | 2 +- web/pgadmin/tools/sqleditor/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/en_US/release_notes_8_14.rst b/docs/en_US/release_notes_8_14.rst index 24bc372e0..eaa215a9b 100644 --- a/docs/en_US/release_notes_8_14.rst +++ b/docs/en_US/release_notes_8_14.rst @@ -31,8 +31,8 @@ Bug fixes ********* | `Issue #5099 `_ - Fixed an issue where Ctrl/Cmd + A was not selecting all data in query tool data grid. + | `Issue #7384 `_ - Fixed an issue where querying a foreign table gives the error 'ForeignTableCommand' object has no attribute 'auto_commit'. | `Issue #7865 `_ - Fixed an issue related to the query tool update connection after the server disconnected from the object explorer. | `Issue #8010 `_ - Fixed an issue where query tool should show results and messages only from the last executed query. | `Issue #8065 `_ - Ensure the crypt key is retrieved correctly on backend server restart. | `Issue #8127 `_ - Fixed an issue where query tool should not prompt for unsaved changes when there are no changes. - diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py index 66c0101da..7f5d4fb80 100644 --- a/web/pgadmin/tools/sqleditor/__init__.py +++ b/web/pgadmin/tools/sqleditor/__init__.py @@ -1759,8 +1759,7 @@ def check_and_upgrade_to_qt(trans_id, connect): if 'gridData' in session and str(trans_id) in session['gridData']: data = pickle.loads(session['gridData'][str(trans_id)]['command_obj']) - if data.object_type == 'table' or data.object_type == 'view' or\ - data.object_type == 'mview': + if data.object_type in ['table', 'foreign_table', 'view', 'mview']: manager = get_driver(PG_DEFAULT_DRIVER).connection_manager( data.sid) default_conn = manager.connection(conn_id=data.conn_id,