fix checkedNotesAt issue

This commit is contained in:
keyan 2022-03-01 11:04:44 -06:00
parent 9eced2b334
commit 50f10550b8

View File

@ -210,19 +210,22 @@ export default {
return true return true
} }
const job = await models.item.findFirst({ const where = {
where: { status: {
status: { not: 'STOPPED'
not: 'STOPPED' },
}, maxBid: {
maxBid: { not: null
not: null
},
statusUpdatedAt: {
gt: user.checkedNotesAt
}
} }
}) }
if (user.checkedNotesAt) {
where.statusUpdatedAt = {
gt: user.checkedNotesAt
}
}
const job = user.checkedNotesAt && await models.item.findFirst({ where })
if (job) { if (job) {
return true return true
} }