mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix updating of matview definitions. Fixes #1595
This commit is contained in:
parent
ce20dbc25a
commit
92bc312d2d
@ -536,7 +536,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
||||
try:
|
||||
SQL, name = self.getSQL(gid, sid, data, vid)
|
||||
SQL = SQL.strip('\n').strip(' ')
|
||||
status, res = self.conn.execute_scalar(SQL)
|
||||
status, res = self.conn.execute_void(SQL)
|
||||
if not status:
|
||||
return internal_server_error(errormsg=res)
|
||||
|
||||
|
@ -1140,16 +1140,24 @@ function(require, $, _, S, Bootstrap, pgAdmin, Alertify, CodeMirror) {
|
||||
}.bind(ctx),
|
||||
updateNode = function() {
|
||||
if (
|
||||
this.i && this.d && this.new._id == this.d._id &&
|
||||
this.new._type == this.d._type
|
||||
this.i && this.d && this.new._type == this.d._type
|
||||
) {
|
||||
// Found the currect
|
||||
_.extend(this.d, this.new._id);
|
||||
this.t.setLabel(ctx.i, {label: this.new.label});
|
||||
this.t.addIcon(ctx.i, {icon: this.new.icon});
|
||||
this.t.setId(ctx.id, {id: this.new.id});
|
||||
this.t.openPath(this.i);
|
||||
this.t.select(this.i);
|
||||
var _id = this.d._id;
|
||||
if (this.new._id != this.d._id) {
|
||||
// Found the new oid, update its node_id
|
||||
var node_data = this.t.itemData(ctx.i);
|
||||
node_data._id = _id = this.new._id;
|
||||
}
|
||||
if (this.new._id == _id) {
|
||||
// Found the currect
|
||||
_.extend(this.d, this.new._id);
|
||||
this.t.setLabel(ctx.i, {label: this.new.label});
|
||||
this.t.addIcon(ctx.i, {icon: this.new.icon});
|
||||
this.t.setId(ctx.id, {id: this.new.id});
|
||||
this.t.openPath(this.i);
|
||||
this.t.deselect(this.i);
|
||||
this.t.select(this.i);
|
||||
}
|
||||
}
|
||||
var success = this.o && this.o.success;
|
||||
if (success && typeof(success) == 'function') {
|
||||
|
Loading…
Reference in New Issue
Block a user