From 0e0e152a6edf6ae3152edfbe17ecd3fbd0b8533f Mon Sep 17 00:00:00 2001 From: Markus Thielker Date: Sun, 17 Mar 2024 15:36:34 +0100 Subject: [PATCH] N-FIN-54: fix category selection can not be cleared --- src/lib/actions/entityCreateUpdate.ts | 4 ++-- src/lib/actions/paymentCreateUpdate.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/actions/entityCreateUpdate.ts b/src/lib/actions/entityCreateUpdate.ts index 01eda35..a1d4101 100644 --- a/src/lib/actions/entityCreateUpdate.ts +++ b/src/lib/actions/entityCreateUpdate.ts @@ -33,7 +33,7 @@ export default async function entityCreateUpdate({ data: { name: name, type: type, - defaultCategoryId: defaultCategoryId, + defaultCategoryId: defaultCategoryId ?? null, }, }, ); @@ -49,7 +49,7 @@ export default async function entityCreateUpdate({ userId: user.id, name: name, type: type, - defaultCategoryId: defaultCategoryId, + defaultCategoryId: defaultCategoryId ?? null, }, }); diff --git a/src/lib/actions/paymentCreateUpdate.ts b/src/lib/actions/paymentCreateUpdate.ts index 6f889ef..a321062 100644 --- a/src/lib/actions/paymentCreateUpdate.ts +++ b/src/lib/actions/paymentCreateUpdate.ts @@ -38,7 +38,7 @@ export default async function paymentCreateUpdate({ date: date, payorId: payorId, payeeId: payeeId, - categoryId: categoryId, + categoryId: categoryId ?? null, note: note, }, }, @@ -57,7 +57,7 @@ export default async function paymentCreateUpdate({ date: date, payorId: payorId, payeeId: payeeId, - categoryId: categoryId, + categoryId: categoryId ?? null, note: note, }, });