Thursday, July 21, 2016

Re: Django 1.8.13 saving new user gets error NOT NULL constraint failed: auth_user.last_login

Hah! You are right! My fault.

On Thursday, July 21, 2016 at 11:55:29 AM UTC-5, Simon Charette wrote:
If you upgraded from Django 1.7 you should make sure to run all auth migrations.

If you're using a custom user model make sure to makemigrations for its app and proceed to migrate it.

Simon

Le jeudi 21 juillet 2016 11:46:37 UTC-4, bobhaugen a écrit :
NOT NULL constraint failed: auth_user.last_login


This is a new user. Why should it have a last_login value? 

I coded around it by giving the new user a fictitious last_login value, but still...

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2866e047-43e6-4801-86a7-e5cbb2a115d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment