From 8c9bdead03c11b619bada04a2377da644c9fa144 Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 7 Oct 2023 22:33:09 +0800 Subject: [PATCH] fix: test error --- packages/plugins/@nocobase/plugin-acl/src/server/server.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts index 9d1ad2fba..98df99611 100644 --- a/packages/plugins/@nocobase/plugin-acl/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-acl/src/server/server.ts @@ -417,7 +417,10 @@ export class PluginACL extends Plugin { isThrough: true, sortable: false, }; - await this.db.getRepository('collections').create({ values: data }); + const r = this.db.getRepository('collections'); + if (r) { + await r.create({ values: data }); + } }); this.app.on('beforeInstallPlugin', async (plugin) => {