Skip to content

Commit 6eaf1cd

Browse files
authored
fix(policy): post-update issue when no rows are updated (#281)
1 parent 546ba8e commit 6eaf1cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class PolicyHandler<Schema extends SchemaDef> extends OperationNodeTransf
124124

125125
// --- Post mutation work ---
126126

127-
if (hasPostUpdatePolicies) {
127+
if (hasPostUpdatePolicies && result.rows.length > 0) {
128128
// entities updated filter
129129
const idConditions = this.buildIdConditions(mutationModel, result.rows);
130130

0 commit comments

Comments
 (0)