File tree 2 files changed +6
-3
lines changed
runtime/src/enhancements/node/policy
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1579,12 +1579,15 @@ export class PolicyProxyHandler<DbClient extends DbClientContract> implements Pr
1579
1579
if ( this . shouldLogQuery ) {
1580
1580
this . logger . info (
1581
1581
`[policy] \`findMany\` ${ this . model } : ${ formatObject ( {
1582
- where : args . where ,
1582
+ where : args . where ?? { } ,
1583
1583
select : candidateSelect ,
1584
1584
} ) } `
1585
1585
) ;
1586
1586
}
1587
- const candidates = await tx [ this . model ] . findMany ( { where : args . where , select : candidateSelect } ) ;
1587
+ const candidates = await tx [ this . model ] . findMany ( {
1588
+ where : args . where ?? { } ,
1589
+ select : candidateSelect ,
1590
+ } ) ;
1588
1591
1589
1592
// build a ID filter based on id values filtered by the additional checker
1590
1593
const { idFilter } = this . buildIdFilterWithEntityChecker ( candidates , entityChecker . func ) ;
Original file line number Diff line number Diff line change @@ -678,7 +678,7 @@ class RequestHandler extends APIHandlerBase {
678
678
args . take = limit ;
679
679
const [ entities , count ] = await Promise . all ( [
680
680
prisma [ type ] . findMany ( args ) ,
681
- prisma [ type ] . count ( { where : args . where } ) ,
681
+ prisma [ type ] . count ( { where : args . where ?? { } } ) ,
682
682
] ) ;
683
683
const total = count as number ;
684
684
You can’t perform that action at this time.
0 commit comments