public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch]: Delete row server error not shown to GUI user
Date: Fri, 28 Apr 2017 16:18:37 +0530
Message-ID: <CAM5-9D_p==3czfqEboxsbgj5Td2+P5s5cr1KrpMg4pGy3MqXuw@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi
The variable list_of_rowid doesn't keep track of rows to be deleted.
If this list is empty simply return 0 since '_rowid' is being used to
highlight the row for which error is occurred in only insert and update
operation.
Please find attached patch and review.
Thanks,
Surinder Kumar
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM_2356.patch (708B, 3-RM_2356.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/command.py b/web/pgadmin/tools/sqleditor/command.py
index be7f21f..1795155 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
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [pgAdmin4][Patch]: Delete row server error not shown to GUI user
In-Reply-To: <CAM5-9D_p==3czfqEboxsbgj5Td2+P5s5cr1KrpMg4pGy3MqXuw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox