From bf2c001c870204c90c8c39ddbc7849bd0494dd37 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Fri, 4 Oct 2019 13:00:39 +0530 Subject: [PATCH] Export job fails when deselecting all the columns. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Select2 parameter 'first_empty' should be set to false for the controls of type array. If it is true then on deselecting/clearing all the values, an empty entry is still there.  Fixes #4751 --- docs/en_US/release_notes_4_14.rst | 1 + .../servers/databases/schemas/tables/static/js/table.js | 4 ++-- web/pgadmin/tools/import_export/static/js/import_export.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en_US/release_notes_4_14.rst b/docs/en_US/release_notes_4_14.rst index e3ec233cc..fc4a7ece0 100644 --- a/docs/en_US/release_notes_4_14.rst +++ b/docs/en_US/release_notes_4_14.rst @@ -21,6 +21,7 @@ Bug fixes ********* | `Issue #4199 `_ - Ensure that 'ENTER' key in the data filter should not run the query. +| `Issue #4751 `_ - Fix issue where export job fails when deselecting all the columns. | `Issue #4755 `_ - Ensure that pgAdmin should work behind reverse proxy if the inbuilt server is used as it is. | `Issue #4756 `_ - Fix issue where pgAdmin does not load completely if loaded in an iframe. | `Issue #4768 `_ - Ensure pgAdmin should work behind reverse proxy on a non standard port. diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js index da3738a76..f38f021e3 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js @@ -400,8 +400,8 @@ define('pgadmin.node.table', [ id: 'coll_inherits', label: gettext('Inherited from table(s)'), url: 'get_inherits', type: 'array', group: gettext('Columns'), disabled: 'checkInheritance', deps: ['typname', 'is_partitioned'], - mode: ['create', 'edit'], - select2: { multiple: true, allowClear: true, + mode: ['create', 'edit'], first_empty: false, + select2: { multiple: true, allowClear: true, first_empty: false, placeholder: gettext('Select to inherit from...')}, transform: function(data, cell) { var control = cell || this, diff --git a/web/pgadmin/tools/import_export/static/js/import_export.js b/web/pgadmin/tools/import_export/static/js/import_export.js index 9c75cc1ff..02f81e542 100644 --- a/web/pgadmin/tools/import_export/static/js/import_export.js +++ b/web/pgadmin/tools/import_export/static/js/import_export.js @@ -200,6 +200,7 @@ define([ select2: { multiple: true, allowClear: true, + first_empty: false, placeholder: gettext('Colums for exporting...'), preserveSelectionOrder: true, }, @@ -251,7 +252,7 @@ define([ select2: { multiple: true, allowClear: true, - first_empty: true, + first_empty: false, placeholder: gettext('Not null columns...'), }, helpMessage: gettext('Do not match the specified column values against the null string. In the default case where the null string is empty, this means that empty values will be read as zero-length strings rather than nulls, even when they are not quoted. This option is allowed only in import, and only when using CSV format.'),