diff --git a/packages/plugins/acl/src/model/RoleResourceActionModel.ts b/packages/plugins/acl/src/model/RoleResourceActionModel.ts index 4bd762f3e..1eec88930 100644 --- a/packages/plugins/acl/src/model/RoleResourceActionModel.ts +++ b/packages/plugins/acl/src/model/RoleResourceActionModel.ts @@ -44,6 +44,12 @@ export class RoleResourceActionModel extends Model { for (const field of fields) { const collectionField = collection.getField(field); + + if (!collectionField) { + console.log(`${field} does not exist`); + continue; + } + const fieldType = collectionField.get('interface') as string; const fieldActions: AssociationFieldAction = associationFieldsActions?.[fieldType]?.[availableAction];