From 30841abd384ca9c605e43f4ff99e4c3e25db4f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Fri, 6 Dec 2024 16:22:59 +0000 Subject: [PATCH] fix: Update code now that field in non-nullable --- app/data/buildPriceRepo.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/data/buildPriceRepo.ts b/app/data/buildPriceRepo.ts index 6bc2221b..b32afbed 100644 --- a/app/data/buildPriceRepo.ts +++ b/app/data/buildPriceRepo.ts @@ -9,8 +9,7 @@ const getBuildPriceByHouseType = async (houseType: string): Promise => { select: { priceMid: true }, }); - // Cast to string as 'not: null' clause in Prisma query does not type narrow - return buildPrice as number; + return buildPrice; } catch (error) { throw new Error( `Data error: Unable to get buildPrice for houseType ${houseType}`