Skip to content

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

Open
@caseynisu

Description

@caseynisu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions