From 93df5e3e54ee2546e618531a4dedbe44d8659bde Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Tue, 2 May 2017 12:20:30 +0100 Subject: [PATCH] Ensure errors thrown when deleting rows in the query tool in edit mode are shown properly. Fixes #2356 --- web/pgadmin/tools/sqleditor/command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/pgadmin/tools/sqleditor/command.py b/web/pgadmin/tools/sqleditor/command.py index be7f21f61..1795155f1 100644 --- a/web/pgadmin/tools/sqleditor/command.py +++ b/web/pgadmin/tools/sqleditor/command.py @@ -526,7 +526,9 @@ class TableCommand(GridCommand): for val in query_res: if query_res[val]['status']: query_res[val]['result'] = 'Transaction ROLLBACK' - _rowid = list_of_rowid[i] + + # If list is empty set rowid to 1 + _rowid = list_of_rowid[i] if list_of_rowid else 1 return status, res, query_res, _rowid