Fix Has Policies filter to exclude dead-status policies
policies: some: {} was matching Non-Renewed, Cancelled, etc.
Now excludes Cancelled/Expired/Non-Renewed/Rewritten/Not taken
This commit is contained in:
parent
db9dae7c7c
commit
b3da81a5d8
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export async function GET(request: NextRequest) {
|
|||
}
|
||||
|
||||
if (hasPolicies === 'true') {
|
||||
where.policies = { some: {} }
|
||||
where.policies = { some: { status: { notIn: ['Cancelled', 'Expired', 'Non-Renewed', 'Rewritten', 'Not taken'] } } }
|
||||
}
|
||||
|
||||
if (teamMemberId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue