Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add another illegal id #17325

Merged
merged 9 commits into from
Sep 12, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion plugin-server/src/worker/ingestion/person-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,18 @@ export const mergeFinalFailuresCounter = new Counter({
help: 'Number of person merge final failures.',
})

const CASE_SENSITIVE_ILLEGAL_IDS = new Set(['[object Object]', 'NaN', 'None', 'none', 'null', '0', 'undefined'])
const CASE_SENSITIVE_ILLEGAL_IDS = new Set([
'[object Object]',
'NaN',
'None',
'none',
'null',
'"null"',
'0',
'"0"',
'undefined',
'"undefined"',
])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we want to do all of these single or double quoted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered about that... looking in the DB we only see them double quoted, but I guess that doesn't mean we'd never see them single quoted 🤔


const isDistinctIdIllegal = (id: string): boolean => {
return id.trim() === '' || CASE_INSENSITIVE_ILLEGAL_IDS.has(id.toLowerCase()) || CASE_SENSITIVE_ILLEGAL_IDS.has(id)
Expand Down