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 deleted by admin cannot sign in again. #334
Comments
I solved the problem by changing, in the ~/avia-develop/apps/snitch_core/lib/core/data/model/user.ex file, ** (Ecto.ConstraintError) constraint error when attempting to delete struct:
I dropped this constraint manually in a postgresql console and it worked. However, I have the feeling that this workaround is clunky, cumbersome, and potentially dangerous. With that being said, I am very curious whether anyone can think of a more elegant, straightforward, and safe alternative. |
When I delete a user from the admin app, re-register with the same user information and then try to sign in, I get following error message:
[error] #PID<0.958.0> running SnitchApiWeb.Endpoint (cowboy_protocol) terminated
Server: localhost:3000 (http)
Request: POST /api/v1/login
(exit) an exception was raised: (Ecto.MultipleResultsError) expected at most one result but got 5 in query:
However, the user is deleted in the users list retrieved in the admin app.
The text was updated successfully, but these errors were encountered: