Skip to content

Fix mentee registration for existing mentees#721

Open
Sowmiya07 wants to merge 1 commit into
Women-Coding-Community:mainfrom
Sowmiya07:bug/fix-mentee-reg
Open

Fix mentee registration for existing mentees#721
Sowmiya07 wants to merge 1 commit into
Women-Coding-Community:mainfrom
Sowmiya07:bug/fix-mentee-reg

Conversation

@Sowmiya07

Copy link
Copy Markdown
Contributor

Fix: Preserve memberTypes and profileStatus on existing mentee update

When a mentee re-registers, the incoming request carries neither memberTypes nor profileStatus, causing a @notempty validation failure and a NullPointerException respectively.

MenteeService.handleMenteeWithId — capture the existing mentee from findById and merge its memberTypes before calling update.

PostgresMenteeRepository.update / create — resolve profileStatus once from the existing record if null in the incoming mentee, reusing the findById result already in scope to avoid redundant DB calls.

@sonarqubecloud

Copy link
Copy Markdown

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