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

django.db.utils.IntegrityError: NOT NULL constraint failed: django_gamification_badge.next_badge_id #40

Open
caseynisu opened this issue May 19, 2021 · 0 comments

Comments

@caseynisu
Copy link

caseynisu commented May 19, 2021

When i try to create new badge definition with the provided documentation of this project it raises Integrity Error.
Code i used:

from django_gamification.models import BadgeDefinition, Category
BadgeDefinition.objects.create(
name='Badge of Awesome',
description='You proved your awesomeness',
points=50,
progression_target=100,
category=Category.objects.create(name='Gold Badges', description='These are the top badges'),
)

Solution for this problem would be adding null=True on field next_badge of model Badge.

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

1 participant