Skip to content

Conversation

@jmgasper
Copy link
Contributor

@jmgasper jmgasper commented Nov 2, 2025

No description provided.


await updateMembersWithTraitsAndSkills(traitUpdate)
updated += 1
const updatedSuccessfully = await updateMembersWithTraitsAndSkills(traitUpdate)
Copy link

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.

@jmgasper jmgasper merged commit c7e70da into master Nov 2, 2025
4 checks passed
_.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)
Copy link

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)
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants