-
Notifications
You must be signed in to change notification settings - Fork 3
Fixes for issues found during pre-production deploy testing #14
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
Conversation
|
|
||
| await updateMembersWithTraitsAndSkills(traitUpdate) | ||
| updated += 1 | ||
| const updatedSuccessfully = await updateMembersWithTraitsAndSkills(traitUpdate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[❗❗ correctness]
The function updateMembersWithTraitsAndSkills is expected to return a boolean indicating success. Ensure that this function consistently returns a boolean in all cases to avoid potential logical errors.
Tweak for specific traits
| _.forEach(ret, r => { | ||
| r.createdAt = r.createdAt ? r.createdAt.getTime() : null | ||
| r.updatedAt = r.updatedAt ? r.updatedAt.getTime() : null | ||
| r.createdBy = helper.bigIntToNumber(r.createdBy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[correctness]
Ensure that helper.bigIntToNumber handles cases where createdBy might be null or undefined. If createdBy is expected to always be a BigInt, consider adding validation earlier in the process to enforce this assumption.
| r.createdAt = r.createdAt ? r.createdAt.getTime() : null | ||
| r.updatedAt = r.updatedAt ? r.updatedAt.getTime() : null | ||
| r.createdBy = helper.bigIntToNumber(r.createdBy) | ||
| r.updatedBy = helper.bigIntToNumber(r.updatedBy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[correctness]
Similar to createdBy, verify that helper.bigIntToNumber correctly handles updatedBy when it is null or undefined. Consider adding validation to ensure updatedBy is always a BigInt if that is the assumption.
No description provided.