Ensure that proper error should be displayed for the deleted node. Fixes #3669

This commit is contained in:
Satish V
2020-06-03 11:26:26 +05:30
committed by Akshay Joshi
parent 3d0319dba7
commit d22e276586
24 changed files with 186 additions and 52 deletions
+4
View File
@@ -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']