mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where fetching the schema throws an error if the database
is not connected in Schema Diff. Fixes #5673 Maintenance Database is selected by default in Schema Diff.
This commit is contained in:
@@ -590,8 +590,10 @@ export default class SchemaDiffUI {
|
||||
if (!_.isUndefined(m.get('source_sid')) && !_.isNull(m.get('source_sid'))
|
||||
&& m.get('source_sid') !== '') {
|
||||
setTimeout(function() {
|
||||
if (self_local.options.length > 0) {
|
||||
m.set('source_did', self_local.options[0].value);
|
||||
for (var i = 0; i < self_local.options.length; i++) {
|
||||
if (self_local.options[i].is_maintenance_db) {
|
||||
m.set('source_did', self_local.options[i].value);
|
||||
}
|
||||
}
|
||||
}, 10);
|
||||
return false;
|
||||
@@ -679,8 +681,10 @@ export default class SchemaDiffUI {
|
||||
if (!_.isUndefined(m.get('target_sid')) && !_.isNull(m.get('target_sid'))
|
||||
&& m.get('target_sid') !== '') {
|
||||
setTimeout(function() {
|
||||
if (self.options.length > 0) {
|
||||
m.set('target_did', self.options[0].value);
|
||||
for (var i = 0; i < self.options.length; i++) {
|
||||
if (self.options[i].is_maintenance_db) {
|
||||
m.set('target_did', self.options[i].value);
|
||||
}
|
||||
}
|
||||
}, 10);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user