fix(client): migration error

This commit is contained in:
chenos 2023-06-24 12:28:43 +08:00
parent 19341952b9
commit 40c1a2b2ce
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,9 @@ export default class extends Migration {
const routes = await uiRoutes.find();
for (const route of routes) {
if (route.uiSchemaUid && route?.options?.component === 'AdminLayout') {
instance.set('options.adminSchemaUid', route.uiSchemaUid);
const options = instance.options || {};
options['adminSchemaUid'] = route.uiSchemaUid;
instance.set('options', options);
console.log('options.adminSchemaUid', route.uiSchemaUid);
await instance.save();
return;

View File

@ -8,7 +8,9 @@ export default class extends Migration {
const routes = await uiRoutes.find();
for (const route of routes) {
if (route.uiSchemaUid && route?.options?.component === 'MApplication') {
instance.set('options.mobileSchemaUid', route.uiSchemaUid);
const options = instance.options || {};
options['mobileSchemaUid'] = route.uiSchemaUid;
instance.set('options', options);
console.log('options.mobileSchemaUid', route.uiSchemaUid);
await instance.save();
return;