From 60ef0dfd6c12bd74c83276f534da9f310690e521 Mon Sep 17 00:00:00 2001 From: andres Date: Mon, 29 Jan 2024 11:37:58 +0100 Subject: [PATCH] fix: save grade 500 error instead of 404 --- src/modules/decks/infrastructure/decks.repository.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/decks/infrastructure/decks.repository.ts b/src/modules/decks/infrastructure/decks.repository.ts index bc096ad..403471d 100644 --- a/src/modules/decks/infrastructure/decks.repository.ts +++ b/src/modules/decks/infrastructure/decks.repository.ts @@ -247,6 +247,8 @@ export class DecksRepository { }, }) + if (!card) return null + const result = await this.prisma.deck.findUnique({ include: { _count: {