magfest/ubersystem

json stats page: magbot badge remaining count is incorrect

Opened this issue · 1 comments

'magbot badges' returns an incorrect number for the number of badges remaining before we hit the cap.

we found this out onsite at super2018 when the magbot badges number reported badges still available, while the actual calculation for how many badges is remaining was incorrect.

the part that matters is the real calculation (which is correct), the issue was mostly we were looking at 'magbot badges' in Slack and got caught off guard when we actually capped.

the place to fix this is in whatever calculates c.REMAINING_BADGES, which is the thing that magbot reads via registration.py's stats() function