Fixed an issue where SQL for index shows the same column multiple times. Fixes #6981

This commit is contained in:
Pradip Parkale 2021-11-15 16:31:40 +05:30 committed by Akshay Joshi
parent d6a754e850
commit 33cc2a7514
2 changed files with 4 additions and 0 deletions

View File

@ -37,4 +37,5 @@ Bug fixes
| `Issue #6972 <https://redmine.postgresql.org/issues/6972>`_ - Ensure that the Binary path for PG14 should be visible in the preferences.
| `Issue #6974 <https://redmine.postgresql.org/issues/6974>`_ - Added operators and aggregates in search objects.
| `Issue #6976 <https://redmine.postgresql.org/issues/6976>`_ - Fixed an issue where textarea should be allowed to resize and have more than 255 chars.
| `Issue #6981 <https://redmine.postgresql.org/issues/6981>`_ - Fixed an issue where SQL for index shows the same column multiple times.
| `Issue #6988 <https://redmine.postgresql.org/issues/6988>`_ - Reset the layout if pgAdmin4 detects the layout is in an inconsistent state.

View File

@ -99,6 +99,9 @@ def get_column_details(conn, idx, data, mode='properties', template_path=None):
"/".join([template_path, 'column_details.sql']), idx=idx
)
status, rset = conn.execute_2darray(SQL)
# Remove column if duplicate column is present in list.
rset['rows'] = [i for n, i in enumerate(rset['rows']) if
i not in rset['rows'][n + 1:]]
if not status:
return internal_server_error(errormsg=rset)