mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed incorrect tablespace options in the drop-down for move objects dialog. Fixes #6586
This commit is contained in:
parent
508f97b08e
commit
2452d90300
@ -23,4 +23,5 @@ Bug fixes
|
||||
| `Issue #6448 <https://redmine.postgresql.org/issues/6448>`_ - Fixed an issue in the search object when searching in 'all types' or 'subscription' if the user doesn't have access to the subscription.
|
||||
| `Issue #6574 <https://redmine.postgresql.org/issues/6574>`_ - Fixed an issue where paste is not working through Right-Click option on PSQL.
|
||||
| `Issue #6580 <https://redmine.postgresql.org/issues/6580>`_ - Fixed TypeError 'NoneType' object is not sub scriptable.
|
||||
| `Issue #6586 <https://redmine.postgresql.org/issues/6586>`_ - Fixed incorrect tablespace options in the drop-down for move objects dialog.
|
||||
| `Issue #6619 <https://redmine.postgresql.org/issues/6619>`_ - Fixed incorrect binary path issue when the user deletes the binary path from the preferences.
|
||||
|
@ -114,12 +114,16 @@ define('pgadmin.node.tablespace', [
|
||||
obj_type: 'all',
|
||||
user: undefined,
|
||||
},
|
||||
initialize: function(attrs, otherArgs) {
|
||||
this.selected_ts = otherArgs.selected_ts;
|
||||
Backbone.Model.prototype.initialize.apply(this, [attrs, otherArgs]);
|
||||
},
|
||||
schema: [{
|
||||
id: 'tblspc', label: gettext('New tablespace'),
|
||||
type: 'text', disabled: false, control: 'node-list-by-name',
|
||||
node: 'tablespace', select2: {allowClear: false},
|
||||
filter: function(o) {
|
||||
return o && (o.label != d.label);
|
||||
return o && (o.label != this.model.selected_ts);
|
||||
},
|
||||
},{
|
||||
id: 'obj_type', label: gettext('Object type'),
|
||||
@ -148,7 +152,7 @@ define('pgadmin.node.tablespace', [
|
||||
var self = this,
|
||||
sql_tab_args = self.model.toJSON();
|
||||
// Add existing tablespace
|
||||
sql_tab_args.old_tblspc = d.label;
|
||||
sql_tab_args.old_tblspc = this.model.selected_ts;
|
||||
|
||||
// Fetches modified SQL
|
||||
$.ajax({
|
||||
@ -236,7 +240,7 @@ define('pgadmin.node.tablespace', [
|
||||
// Create treeInfo
|
||||
var treeInfo = node.getTreeNodeHierarchy.apply(node, [_i]);
|
||||
// Instance of backbone model
|
||||
var newModel = new objModel({}, {node_info: treeInfo}),
|
||||
var newModel = new objModel({}, {node_info: treeInfo, selected_ts: _d.label}),
|
||||
fields = Backform.generateViewSchema(
|
||||
treeInfo, newModel, 'create', node,
|
||||
treeInfo.server, true
|
||||
|
Loading…
Reference in New Issue
Block a user