From 06649c2e314f34a050dc827ef95b5bc175b6249a Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Thu, 13 Apr 2023 22:59:04 -0700 Subject: [PATCH] at null check for subdivision save --- queries/analytics/session/createSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries/analytics/session/createSession.ts b/queries/analytics/session/createSession.ts index 7286cb97..4014ac41 100644 --- a/queries/analytics/session/createSession.ts +++ b/queries/analytics/session/createSession.ts @@ -44,7 +44,7 @@ async function relationalQuery(data: Prisma.SessionCreateInput) { screen, language, country, - subdivision1: country.concat('-', subdivision1), + subdivision1: subdivision1 ? country.concat('-', subdivision1) : null, subdivision2, city, },