Just use subdivision-1.

This commit is contained in:
Brian Cao 2023-08-25 18:40:02 -07:00
parent cf1dd422fe
commit e422fc1ecd
2 changed files with 3 additions and 3 deletions

View File

@ -138,8 +138,8 @@ async function clickhouseQuery(data: {
session_id: sessionId,
event_id: uuid(),
country: country ? country : null,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision2: subdivision2 ? subdivision2 : null,
subdivision1: subdivision1 ?? null,
subdivision2: subdivision2 ?? null,
city: city ? city : null,
url_path: urlPath?.substring(0, URL_LENGTH),
url_query: urlQuery?.substring(0, URL_LENGTH),

View File

@ -30,7 +30,7 @@ export async function createSession(data: Prisma.SessionCreateInput) {
screen,
language,
country,
subdivision1: country && subdivision1 ? `${country}-${subdivision1}` : null,
subdivision1,
subdivision2,
city,
},