mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
fix assessment db selection (#16591)
This commit is contained in:
@@ -81,7 +81,18 @@ export class DatabaseSelectorPage extends MigrationWizardPage {
|
||||
});
|
||||
}
|
||||
public async onPageLeave(): Promise<void> {
|
||||
this.migrationStateModel._databaseAssessment = this.selectedDbs();
|
||||
const assessedDatabases = this.migrationStateModel._databaseAssessment ?? [];
|
||||
const selectedDatabases = this.selectedDbs();
|
||||
// run assessment if
|
||||
// * the prior assessment had an error or
|
||||
// * the assessed databases list is different from the selected databases list
|
||||
this.migrationStateModel._runAssessments = !!this.migrationStateModel._assessmentResults?.assessmentError
|
||||
|| assessedDatabases.length === 0
|
||||
|| assessedDatabases.length !== selectedDatabases.length
|
||||
|| assessedDatabases.some(db => selectedDatabases.indexOf(db) < 0);
|
||||
|
||||
this.migrationStateModel._databaseAssessment = selectedDatabases;
|
||||
|
||||
this.wizard.registerNavigationValidator((pageChangeInfo) => {
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user