Fixed unable to drop multiple Rules and Foreign Tables from properties tab. Fixes #3899

This commit is contained in:
Khushboo Vashi
2019-01-31 13:03:37 +05:30
committed by Akshay Joshi
parent 1bce0b5eef
commit 3b35aaa1d7
3 changed files with 5 additions and 1 deletions

View File

@@ -523,6 +523,7 @@ define('pgadmin.node.foreign_table', [
},
model: pgBrowser.Node.Model.extend({
idAttribute: 'oid',
initialize: function(attrs, args) {
var isNew = (_.size(attrs) === 0);
if (isNew) {
@@ -571,7 +572,8 @@ define('pgadmin.node.foreign_table', [
type: 'multiline',
},{
id: 'ftsrvname', label: gettext('Foreign server'), cell: 'string', control: 'node-ajax-options',
type: 'text', group: gettext('Definition'), url: 'get_foreign_servers', disabled: function(m) { return !m.isNew(); },
type: 'text', group: gettext('Definition'), url: 'get_foreign_servers',
disabled: function(m) { return !m.isNew(); }, cache_node: 'database',
},{
id: 'inherits', label: gettext('Inherits'), group: gettext('Definition'),
type: 'array', min_version: 90500, control: NodeAjaxOptionsMultipleControl,

View File

@@ -125,6 +125,7 @@ define('pgadmin.node.rule', [
properties of the model in schema.
*/
model: pgAdmin.Browser.Node.Model.extend({
idAttribute: 'oid',
schema: [{
id: 'name', label: gettext('Name'),
type: 'text', disabled: function(m) {