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, }, });