From 74f7fee8b5dfd67f63ba03f4d1ee88a043da6ddd Mon Sep 17 00:00:00 2001 From: Nikhil Mohite Date: Wed, 22 Jun 2022 17:38:07 +0530 Subject: [PATCH] Fixed an issue where pgAdmin stuck while creating a new index. Fixes #7460 --- docs/en_US/release_notes_6_11.rst | 1 + .../databases/schemas/tables/indexes/static/js/index.ui.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_6_11.rst b/docs/en_US/release_notes_6_11.rst index 736c53219..17fd9e50b 100644 --- a/docs/en_US/release_notes_6_11.rst +++ b/docs/en_US/release_notes_6_11.rst @@ -32,4 +32,5 @@ Bug fixes | `Issue #7441 `_ - Ensure that the Query Editor should be focused when switching between query tool tabs. | `Issue #7443 `_ - Fixed and issue where 'Use spaces' not working in the query tool. | `Issue #7453 `_ - Fixed an issue where the Database restriction is not working. + | `Issue #7460 `_ - Fixed an issue where pgAdmin stuck while creating a new index. | `Issue #7468 `_ - Skip the history records if the JSON info can't be parsed instead of showing 'No history'. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js index 06b48391f..0dc935bcd 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/static/js/index.ui.js @@ -321,10 +321,11 @@ export default class IndexSchema extends BaseUISchema { }; }); }; - if(state.amname != actionObj.oldState.amname) { + if((state.amname != actionObj.oldState.amname) && state.columns.length > 0) { return new Promise((resolve)=>{ Notify.confirm( - gettext('Changing access method will clear columns collection'), + gettext('Warning'), + gettext('Changing access method will clear columns collection. Do you want to continue?'), function () { setColumns(resolve); },