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

User Update email already exists error fix #1384

Closed

Conversation

nitishkumar333
Copy link
Contributor

What kind of change does this PR introduce?
Bugfix

Fixes #1382

Summary
Added a condition that will check if the user changed the email or not. If the email is changed then only it will check if the email already exists or not. Also changed "find" to "findOne" as we know only one user will have a email and it is faster.

Did you add tests for your changes?
No

Other information

Have you read the contributing guide?

Yes

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congratulations on making your first PR! 🎊 If you haven't already, check out our Contributing Guidelines and PR Reporting Guidelines to ensure that you are following our guidelines for contributing and creating PR.

@palisadoes
Copy link
Contributor

@nitishkumar333 Please also add a test for this modification. We don't want the failure to happen again.

@codecov
Copy link

codecov bot commented Sep 7, 2023

Codecov Report

Merging #1384 (52ff5c9) into develop (c0468a4) will increase coverage by 0.06%.
Report is 7 commits behind head on develop.
The diff coverage is 99.69%.

@@             Coverage Diff             @@
##           develop    #1384      +/-   ##
===========================================
+ Coverage    98.17%   98.24%   +0.06%     
===========================================
  Files          184      184              
  Lines        10767    11295     +528     
  Branches       835      874      +39     
===========================================
+ Hits         10571    11097     +526     
- Misses         186      188       +2     
  Partials        10       10              
Files Changed Coverage Δ
src/resolvers/Mutation/leaveOrganization.ts 98.36% <93.75%> (-1.64%) ⬇️
src/resolvers/DirectChat/organization.ts 100.00% <100.00%> (ø)
src/resolvers/GroupChat/organization.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/acceptMembershipRequest.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/addOrganizationImage.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/addUserToGroupChat.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/adminRemoveEvent.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/adminRemoveGroup.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/blockUser.ts 100.00% <100.00%> (ø)
src/resolvers/Mutation/cancelMembershipRequest.ts 100.00% <100.00%> (ø)
... and 25 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

User Update fails if email not changed
2 participants