fix Item.root resolver for anon

This commit is contained in:
keyan 2024-07-14 15:53:40 -05:00
parent e1d6632445
commit e045c46811
1 changed files with 1 additions and 1 deletions

View File

@ -1165,7 +1165,7 @@ export default {
FROM "Item"
${whereClause(
'"Item".id = $1',
`("Item"."invoiceActionState" IS NULL OR "Item"."invoiceActionState" = 'PAID' OR "Item"."userId" = ${me.id})`
`("Item"."invoiceActionState" IS NULL OR "Item"."invoiceActionState" = 'PAID'${me ? ` OR "Item"."userId" = ${me.id}` : ''})`
)}`
}, Number(item.rootId))