Updated subdivision save.

This commit is contained in:
Mike Cao 2023-04-13 23:32:28 -07:00
parent fa52e6c83f
commit 43a4357729
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ async function clickhouseQuery(data: {
session_id: sessionId,
event_id: eventId,
country: country ? country : null,
subdivision1: subdivision1 ? country.concat('-', subdivision1) : null,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision2: subdivision2 ? subdivision2 : null,
city: city ? city : null,
url_path: urlPath?.substring(0, URL_LENGTH),

View File

@ -44,7 +44,7 @@ async function relationalQuery(data: Prisma.SessionCreateInput) {
screen,
language,
country,
subdivision1: subdivision1 ? country.concat('-', subdivision1) : null,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision2,
city,
},