fix: migration up error (#2135)

This commit is contained in:
chenos 2023-06-27 15:19:32 +08:00 committed by GitHub
parent c32533e1b8
commit e79ea701a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export default class extends Migration {
}
}
instance = await systemSettings.findOne();
if (!instance.get('options')?.mobileSchemaUid) {
if (!instance?.options?.adminSchemaUid) {
throw new Error('adminSchemaUid invalid');
}
this.app.log.info('systemSettings.options', instance.toJSON());

View File

@ -18,7 +18,7 @@ export default class extends Migration {
}
}
instance = await systemSettings.findOne();
if (!instance.get('options')?.mobileSchemaUid) {
if (!instance?.options?.mobileSchemaUid) {
throw new Error('mobileSchemaUid invalid');
}
this.app.log.info('systemSettings.options', instance.toJSON());