Fix user since if first item wasn't paid (#1773)
This commit is contained in:
parent
4262189c91
commit
bec27a5a0e
|
@ -935,7 +935,8 @@ export default {
|
||||||
// get the user's first item
|
// get the user's first item
|
||||||
const item = await models.item.findFirst({
|
const item = await models.item.findFirst({
|
||||||
where: {
|
where: {
|
||||||
userId: user.id
|
userId: user.id,
|
||||||
|
OR: [{ invoiceActionState: 'PAID' }, { invoiceActionState: null }]
|
||||||
},
|
},
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: 'asc'
|
createdAt: 'asc'
|
||||||
|
|
Loading…
Reference in New Issue