From d817ec4c7b2bbfc2f8b72f7a7c0e5b6d4ce9b84e Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 30 Nov 2021 16:43:44 +0800 Subject: [PATCH] fix: missing parameters --- .../client/src/components/admin-layout/Collections/index.tsx | 2 +- packages/plugin-permissions/src/collections/roles.ts | 3 +++ packages/plugin-users/src/server.ts | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/client/src/components/admin-layout/Collections/index.tsx b/packages/client/src/components/admin-layout/Collections/index.tsx index 6addd80ab..eec41a7de 100644 --- a/packages/client/src/components/admin-layout/Collections/index.tsx +++ b/packages/client/src/components/admin-layout/Collections/index.tsx @@ -782,7 +782,7 @@ function EditFieldButton() { }} schema={{ type: 'object', - properties: clone(schema.properties), + properties: clone(schema?.properties), }} /> diff --git a/packages/plugin-permissions/src/collections/roles.ts b/packages/plugin-permissions/src/collections/roles.ts index 25aa47ff0..f7e37e182 100644 --- a/packages/plugin-permissions/src/collections/roles.ts +++ b/packages/plugin-permissions/src/collections/roles.ts @@ -27,18 +27,21 @@ export default { type: 'hasMany', name: 'actionPermissions', target: 'action_permissions', + state: 0, }, { type: 'belongsToMany', name: 'users', target: 'users', through: 'roles_users', + state: 0, }, { type: 'belongsToMany', name: 'ui_schemas', target: 'ui_schemas', through: 'roles_ui_schemas', + state: 0, }, ], } as TableOptions; diff --git a/packages/plugin-users/src/server.ts b/packages/plugin-users/src/server.ts index 24a7062b7..619089403 100644 --- a/packages/plugin-users/src/server.ts +++ b/packages/plugin-users/src/server.ts @@ -29,6 +29,7 @@ export default { type: 'createdBy', name: typeof createdBy === 'string' ? createdBy : 'createdBy', target: 'users', + state: 0, }); } if (updatedBy !== false) { @@ -36,6 +37,7 @@ export default { type: 'updatedBy', name: typeof updatedBy === 'string' ? updatedBy : 'updatedBy', target: 'users', + state: 0, }); } });