diff --git a/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts index e2948e6c1c..9b77f75f52 100644 --- a/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts +++ b/packages/plugins/@nocobase/plugin-data-source-main/src/server/server.ts @@ -316,7 +316,7 @@ export class PluginDataSourceMainServer extends Plugin { this.app.db.on('fields.beforeDestroy', beforeDestroyForeignKey(this.app.db)); this.app.db.on('fields.beforeDestroy', async (model: FieldModel, options) => { - const lockKey = `${this.name}:fields.beforeDestroy:${model.get('collectionName')}:${model.get('name')}`; + const lockKey = `${this.name}:fields.beforeDestroy:${model.get('collectionName')}`; await this.app.lockManager.runExclusive(lockKey, async () => { await model.remove(options);