Fixed CSV export from Query Tool results does not include all columns for multiple CTEs. #6122

This commit is contained in:
Khushboo Vashi 2023-04-11 19:09:26 +05:30
parent 290e160e13
commit 6ab102fcbc
2 changed files with 11 additions and 8 deletions

View File

@ -70,3 +70,4 @@ Bug fixes
| `Issue #6093 <https://github.com/pgadmin-org/pgadmin4/issues/6093>`_ - Fix the dependents SQL of Roles which is throwing a type casting error on PostgreSQL 15.
| `Issue #6100 <https://github.com/pgadmin-org/pgadmin4/issues/6100>`_ - Fixed the LDAP authentication issue for the simultaneous login attempts.(CVE-2023-1907)
| `Issue #6109 <https://github.com/pgadmin-org/pgadmin4/issues/6109>`_ - Fixed asyncio random task error messages in Query tool.
| `Issue #6122 <https://github.com/pgadmin-org/pgadmin4/issues/6122>`_ - Fixed CSV export from Query Tool results does not include all columns for multiple CTEs.

View File

@ -316,10 +316,11 @@ class AsyncDictCursor(_async_cursor):
Fetch many tuples as ordered dictionary list.
"""
self._odt_desc = None
if _tupples:
self.row_factory = tuple_row
res = asyncio.run(self._fetchmany(size))
if _tupples:
if not _tupples and res is not None:
res = [self._dict_tuple(t) for t in res]
self.row_factory = dict_row
return res
@ -340,10 +341,11 @@ class AsyncDictCursor(_async_cursor):
Fetch all tuples as ordered dictionary list.
"""
self._odt_desc = None
if _tupples:
self.row_factory = tuple_row
res = asyncio.run(self._fetchall())
if _tupples:
if not _tupples and res is not None:
res = [self._dict_tuple(t) for t in res]
self.row_factory = dict_row
return res