mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-30 16:56:07 +08:00
fix: use collection.filterTargetKey instead of Model.primaryKeyField (#8853)
This commit is contained in:
@@ -52,9 +52,14 @@ function createWithACLMetaMiddleware() {
|
||||
return;
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
const primaryKeyField = Model.primaryKeyField || Model.primaryKeyAttribute;
|
||||
const filterTargetKey = collection.filterTargetKey;
|
||||
|
||||
// ensure we only proceed when there is a single string key
|
||||
if (!filterTargetKey || typeof filterTargetKey !== 'string') {
|
||||
return;
|
||||
}
|
||||
|
||||
const primaryKeyField = filterTargetKey;
|
||||
let listData;
|
||||
|
||||
if (ctx.body?.data) {
|
||||
|
||||
Reference in New Issue
Block a user