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

IntegrityError: null value in column "interface_id" violates not-null constraint #37

Open
khashashin opened this issue Jul 7, 2019 · 1 comment

Comments

@khashashin
Copy link

I have added the interface as you described in README but this seems to trigger issues if I do it to existing AbstractUser model
interface = models.ForeignKey(GamificationInterface).

I have custom user model like:

class User(AbstractUser):
    REQUIRED_FIELDS = ['first_name', 'last_name', 'email']
    USERNAME_FIELD = 'username'

and I have added the interface to it

class User(AbstractUser):
    REQUIRED_FIELDS = ['first_name', 'last_name', 'email']
    USERNAME_FIELD = 'username'

    interface = models.ForeignKey(GamificationInterface, on_delete=models.CASCADE)

and now if I create superuser I get following error:

django.db.utils.IntegrityError: null value in column "interface_id" violates not-null constraint

@kartikpatel8088
Copy link

kartikpatel8088 commented May 13, 2021

I am facing same issue. Any updates or solution did you find @khashashin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants