Fixed code smell 'String literals should not be duplicated'.

This commit is contained in:
Khushboo Vashi
2020-09-03 18:35:58 +05:30
committed by Akshay Joshi
parent 974d395a48
commit 31bbdd6a12
8 changed files with 79 additions and 68 deletions

View File

@@ -27,6 +27,7 @@ from pgadmin.utils.ajax import make_json_response, internal_server_error
from pgadmin.utils.driver import get_driver
from pgadmin.utils.exception import ConnectionLost, SSHTunnelConnectionLost,\
CryptKeyMissing
from pgadmin.utils.constants import ERROR_MSG_TRANS_ID_NOT_FOUND
class StartRunningQuery:
@@ -173,7 +174,7 @@ class StartRunningQuery:
if 'gridData' not in http_session:
return make_json_response(
success=0,
errormsg=gettext('Transaction ID not found in the session.'),
errormsg=ERROR_MSG_TRANS_ID_NOT_FOUND,
info='DATAGRID_TRANSACTION_REQUIRED', status=404
)
grid_data = http_session['gridData']
@@ -181,7 +182,7 @@ class StartRunningQuery:
if str(transaction_id) not in grid_data:
return make_json_response(
success=0,
errormsg=gettext('Transaction ID not found in the session.'),
errormsg=ERROR_MSG_TRANS_ID_NOT_FOUND,
info='DATAGRID_TRANSACTION_REQUIRED',
status=404
)