Fix user since if first item wasn't paid (#1773)

This commit is contained in:
ekzyis 2024-12-30 23:33:17 +01:00 committed by GitHub
parent 4262189c91
commit bec27a5a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -935,7 +935,8 @@ export default {
// get the user's first item
const item = await models.item.findFirst({
where: {
userId: user.id
userId: user.id,
OR: [{ invoiceActionState: 'PAID' }, { invoiceActionState: null }]
},
orderBy: {
createdAt: 'asc'