Sign up error: null value in column "city" violates not-null constraint
Here are the comments of two users:
User 1
- When I try to sign up the Error message appeared with: IntegrityError at /accounts/Caroline/signup/complete/
- Straight after I thought I might alreay have an account so I clicked on sign in and this meesage showed up: IntegrityError at /accounts/signin/
null value in column "city" violates not-null constraint
-
then I could not access to the page again, it showed the error page
-
3min later I refreshed the page and it landed on the home page, and I was logged in!!
User 2
I tried to sign up but encountered a problem... not sure if I had to select my city first? I entered username, email address and password and clicked enter and then an error message appeared. I took a screen shot of the error message and copied all the data it showed me into a word document if you wanna have a look, please find attached.
Comments (4)
-
reporter -
It is random. The middleware couldn't figure out the city the IP was and by the time of the profile creation tried to write an empty city value when the city is considered not null to the database.
The fix shouldn't be that hard to implement.
-
reporter Ah, OK, one of the users actually said that it might be a time issue.
Maybe we can say that if the IP cannot figured out, we automatically choose London (with the user having to manually update the correct city in his profile).
-
- changed status to resolved
Added a migration and an unit test to ensure this do not happen again. Should be fine now.
- Log in to comment
This seems to be a random problem, as Henning just wrote that everything worked fine for him.