IntegrityError raised if user tries to set his email address to an address that another user is using
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Resonate |
Confirmed
|
Low
|
Unassigned |
Bug Description
This can occur if user makes a POST request to /profile, specifying an already-in-use email address. This bug is unlikely to occur unless a user happens to have two accounts, and he tries to set the address for the one to be the same as that for the other. (That is how I came across this.)
This implies that the same exception will likely be raised if a user tries to signup using an already-in-use email address.
Here's a snippet of the traceback...
Traceback (most recent call last):
File "/home/
ret = view_func(request, *args, **kwargs)
File "/home/
user.flush()
File "/home/
return Model.flush(self)
File "/home/
dbsession.
...
File "/home/
self.
File "/home/
cursor.
IntegrityError: (IntegrityError) duplicate key value violates unique constraint "users_email_key"
'UPDATE users SET email=%(email)s WHERE users.id = %(users_id)s' {'users_id': 208, 'email': '<email address hidden>'}
Changed in resonate: | |
status: | New → Confirmed |
importance: | Undecided → Low |