public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][Patch]: Delete row server error not shown to GUI user
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][Patch]: Delete row server error not shown to GUI user
@ 2017-04-28 10:48 Surinder Kumar <[email protected]>
  2017-05-02 11:20 ` Re: [pgAdmin4][Patch]: Delete row server error not shown to GUI user Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Surinder Kumar @ 2017-04-28 10:48 UTC (permalink / raw)
  To: pgadmin-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
 


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin4][Patch]: Delete row server error not shown to GUI user
  2017-04-28 10:48 [pgAdmin4][Patch]: Delete row server error not shown to GUI user Surinder Kumar <[email protected]>
@ 2017-05-02 11:20 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2017-05-02 11:20 UTC (permalink / raw)
  To: Surinder Kumar <[email protected]>; +Cc: pgadmin-hackers

Thanks, patch applied.

On Fri, Apr 28, 2017 at 11:48 AM, Surinder Kumar <
[email protected]> wrote:

> 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
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-05-02 11:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 10:48 [pgAdmin4][Patch]: Delete row server error not shown to GUI user Surinder Kumar <[email protected]>
2017-05-02 11:20 ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox