mattjegan / django-gamification

The missing Django Gamification Package
Other
166 stars 28 forks source link

Implement chained badges #3

Closed mattjegan closed 6 years ago

mattjegan commented 7 years ago

Add next_badge = models.ForeignKey('self', null=True) on BadgeDefinition and when the Badge is created in the .save method, the Badge.next_badge field needs to be updated to point at the Badge that corresponds with the BadgeDefinition it's definition points to.

E.g.

BadgeDefA.next_badge ---> BadgeDefB
|
BadgeA.next_badge    ---> BadgeA
aljp commented 6 years ago

Fixed in PR #11

Thanks @gitsteph