Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Commit 41649b3

Browse files
committed
fix tests
1 parent 5219cab commit 41649b3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/plugins/policy/src/policy-handler.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ export class PolicyHandler<Schema extends SchemaDef> extends OperationNodeTransf
396396
let filter = this.buildPolicyFilter(mutationModel, alias, 'update');
397397

398398
if (node.from) {
399+
// reject non-existing tables
400+
this.tryRejectNonexistingTables(node.from.froms);
401+
399402
// for update with from (join), we need to merge join tables' policy filters to the "where" clause
400403
const joinFilter = this.createPolicyFilterForFrom(node.from);
401404
if (joinFilter) {
@@ -1099,7 +1102,7 @@ export class PolicyHandler<Schema extends SchemaDef> extends OperationNodeTransf
10991102
return result;
11001103
}
11011104

1102-
private getFieldPolicies(model: string, field: string, operation: CRUD_EXT) {
1105+
private getFieldPolicies(model: string, field: string, operation: FieldLevelPolicyOperations) {
11031106
const fieldDef = QueryUtils.requireField(this.client.$schema, model, field);
11041107
const result: Policy[] = [];
11051108

0 commit comments

Comments
 (0)