diff --git a/docs/en_US/release_notes_4_6.rst b/docs/en_US/release_notes_4_6.rst index 39c1775ca..20a322b08 100644 --- a/docs/en_US/release_notes_4_6.rst +++ b/docs/en_US/release_notes_4_6.rst @@ -24,5 +24,6 @@ Bug fixes | `Bug #4121 `_ - Fixed alignment issue of columns in definition section of Index node. | `Bug #4134 `_ - Fixed 'Location cannot be empty' error when open Tablespace properties. | `Bug #4138 `_ - Fix an issue where the dropdown becomes misaligned/displaced. +| `Bug #4160 `_ - Fixed 'Increment value cannot be empty' error for existing tables. | `Bug #4161 `_ - Ensure that parameters of procedures for EPAS server 10 and below should be set/reset properly. | `Bug #4182 `_ - Ensure sanity of the permissions on the storage and session directories and the config database. \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/static/js/column.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/static/js/column.js index a5bd7804f..74b37042a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/static/js/column.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/static/js/column.js @@ -193,6 +193,15 @@ define('pgadmin.node.column', [ seqcache: undefined, seqcycle: undefined, }, + initialize: function(attrs) { + if (_.size(attrs) !== 0) { + this.set({ + 'old_attidentity': this.get('attidentity'), + }, {silent: true}); + } + pgBrowser.Node.Model.prototype.initialize.apply(this, arguments); + + }, schema: [{ id: 'name', label: gettext('Name'), cell: 'string', type: 'text', disabled: 'inSchemaWithColumnCheck', @@ -658,7 +667,8 @@ define('pgadmin.node.column', [ maximum = this.get('seqmax'), start = this.get('seqstart'); - if (!this.isNew()) { + if (!this.isNew() && (this.get('old_attidentity') == 'a' || this.get('old_attidentity') == 'd') && + (this.get('attidentity') == 'a' || this.get('attidentity') == 'd')) { if (_.isUndefined(this.get('seqincrement')) || String(this.get('seqincrement')).replace(/^\s+|\s+$/g, '') == '') { msg = gettext('Increment value cannot be empty.');