mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
Ensure that proper error should be displayed for the deleted node. Fixes #3669
This commit is contained in:
@@ -21,6 +21,7 @@ from pgadmin.tools.sqleditor.utils.is_query_resultset_updatable \
|
||||
from pgadmin.tools.sqleditor.utils.save_changed_data import save_changed_data
|
||||
from pgadmin.tools.sqleditor.utils.get_column_types import get_columns_types
|
||||
from pgadmin.utils.preferences import Preferences
|
||||
from web.pgadmin.utils.exception import ObjectGone
|
||||
|
||||
from config import PG_DEFAULT_DRIVER
|
||||
|
||||
@@ -187,6 +188,9 @@ class SQLFilter(object):
|
||||
status, result = conn.execute_dict(query)
|
||||
if not status:
|
||||
raise Exception(result)
|
||||
if len(result['rows']) == 0:
|
||||
raise ObjectGone(
|
||||
gettext("The specified object could not be found."))
|
||||
|
||||
self.nsp_name = result['rows'][0]['nspname']
|
||||
self.object_name = result['rows'][0]['relname']
|
||||
|
||||
Reference in New Issue
Block a user