From bec27a5a0ef3bcf525a30c949129c1e5afc17179 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Mon, 30 Dec 2024 23:33:17 +0100 Subject: [PATCH] Fix user since if first item wasn't paid (#1773) --- api/resolvers/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/resolvers/user.js b/api/resolvers/user.js index 03f6a8d1..3dd6863f 100644 --- a/api/resolvers/user.js +++ b/api/resolvers/user.js @@ -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'