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

View File

@@ -24,7 +24,7 @@ from pgadmin.utils import PgAdminModule, \
ACCESSKEY_FIELDS as accesskey_fields
from pgadmin.utils.ajax import bad_request
from pgadmin.utils.ajax import make_json_response, \
internal_server_error
internal_server_error, gone
from pgadmin.utils.driver import get_driver
from pgadmin.settings import get_setting
@@ -391,6 +391,9 @@ def init_function(node_type, sid, did, scid, fid, trid=None):
"Error retrieving function information from database")
return internal_server_error(errormsg=r_set)
if len(r_set['rows']) == 0:
return gone(
gettext("The specified %s could not be found." % node_type))
ret_status = status
# Check that the function is actually debuggable...