public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][RM-7005]: On demand rows throws error if any cell edit saved
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][RM-7005]: On demand rows throws error if any cell edit saved
@ 2021-11-25 06:47 Nikhil Mohite <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil Mohite @ 2021-11-25 06:47 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
Please find the attached patch for RM-7005:
<https://redmine.postgresql.org/issues/7005; On-demand rows throw an error
if any cell edit saved
--
*Thanks & Regards,*
*Nikhil Mohite*
*Senior Software Engineer.*
*EDB Postgres* <https://www.enterprisedb.com/;
*Mob.No: +91-7798364578.*
Attachments:
[application/octet-stream] RM-7005.patch (1.3K, 3-RM-7005.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index 045c01bf..ef0994ee 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -560,7 +560,7 @@ def fetch(trans_id, fetch_all=None):
status = 'Error'
else:
status = 'Success'
- res_len = len(result)
+ res_len = len(result) if result else 0
if fetch_row_cnt != -1 and res_len == ON_DEMAND_RECORD_COUNT:
has_more_rows = True
diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py
index a2d1a873..535166ba 100644
--- a/web/pgadmin/utils/driver/psycopg2/connection.py
+++ b/web/pgadmin/utils/driver/psycopg2/connection.py
@@ -1113,7 +1113,6 @@ WHERE db.datname = current_database()""")
formatted exception message
"""
status, cur = self.__cursor()
- self.row_count = 0
if not status:
return False, str(cur)
@@ -1164,8 +1163,6 @@ WHERE db.datname = current_database()""")
)
return False, errmsg
- self.row_count = cur.rowcount
-
return True, None
def __attempt_execution_reconnect(self, fn, *args, **kwargs):
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][RM-7005]: On demand rows throws error if any cell edit saved
@ 2021-11-28 08:04 Akshay Joshi <[email protected]>
parent: Nikhil Mohite <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2021-11-28 08:04 UTC (permalink / raw)
To: Nikhil Mohite <[email protected]>; +Cc: pgadmin-hackers
Thanks, the patch applied.
On Thu, Nov 25, 2021 at 12:17 PM Nikhil Mohite <
[email protected]> wrote:
> Hi Hackers,
>
> Please find the attached patch for RM-7005:
> <https://redmine.postgresql.org/issues/7005; On-demand rows throw an
> error if any cell edit saved
>
> --
> *Thanks & Regards,*
> *Nikhil Mohite*
> *Senior Software Engineer.*
> *EDB Postgres* <https://www.enterprisedb.com/;
> *Mob.No: +91-7798364578.*
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2021-11-28 08:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 06:47 [pgAdmin][RM-7005]: On demand rows throws error if any cell edit saved Nikhil Mohite <[email protected]>
2021-11-28 08:04 ` Akshay Joshi <[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