Permalink
Browse files

Fix topoff invites bug

This fixes the bug where topping off invites would
remove someone's unlimited invites.
  • Loading branch information...
1 parent d930751 commit bedff483a0bd3120ed4ed54b2037e01586ee659d @paltman paltman committed Jan 31, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 kaleo/models.py
View
@@ -98,7 +98,7 @@ def topoff_user(cls, user, amount):
"Makes sure user has a certain number of invites"
stat, _ = cls.objects.get_or_create(user=user)
remaining = stat.invites_remaining()
- if remaining < amount:
+ if remaining != -1 and remaining < amount:
stat.invites_allocated += (amount - remaining)
stat.save()

0 comments on commit bedff48

Please sign in to comment.