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

500 eror on web operations when duplicate email addresses exist #352

ohporter opened this Issue May 25, 2018 · 3 comments


None yet
3 participants
Copy link

ohporter commented May 25, 2018

Description of problem

When two users are created with the same email address, various queries will fail due to multiple objects being found with the same email address. This might commonly happen by reusing the admin email address when creating a user through the admin panel. This results in a failure on any web action that results in sending an email alert to a user. The common one where I first noticed it is creating a new test run.

Component (web, API, etc)


Version or commit hash (if applicable)


How often reproducible


Steps to Reproduce

  1. Logged in as admin, create a new user with the same email as admin
  2. Create a test plan and confirmed test case
  3. Create a new test run with the test case and click Save

Actual results

500 error

with debug enabled we get MultipleObjectsReturned get() returned more than one User -- it returned 2!

Expected results

Operation successful, in the case of a test run ,we expect the run to be created after save and the notification email sent.

Additional info

Workaround is to make sure the admin does not manually create any users with duplicate email addresses. Users created by the registration option are forced to have a unique email address. It might be a good idea to have the same check within the Admin interface for adding users.


This comment has been minimized.

Copy link

atodorov commented May 28, 2018

similar to #68.

@ohporter can you post information how are you able to create users with duplicate email addresses ?


This comment has been minimized.

Copy link

ohporter commented May 28, 2018

  1. Set up KiWi TCMS as normal ending with creation of initial user, admin with email address of
  2. Login as admin user
  3. Click Admin->Users and Groups
  4. Click User+ (add user)
  5. Enter username and password of user
  6. Click Save and Continue to Edit
  7. Enter in password field
  8. Click Save

There are now two users with the same email address in the database.


This comment has been minimized.

Copy link

atodorov commented May 31, 2018

@asankov here's a challenge for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.