Closed Bug 851671 Opened 13 years ago Closed 13 years ago

Point values not mapping to the correct levels

Categories

(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2013-06-13

People

(Reporter: amyt, Assigned: kmag)

Details

Attachments

(2 files)

Attached image Archaeopteryx
We are not currently displaying the correct levels on the reviewer leaderboard. Giorgio should be on Level 2 (not Level 3) with 6,007 points, and Archaeopteryx should not have any level assigned since he has 1,250 points. The table is here: https://wiki.mozilla.org/Marketplace/Reviewers/Points_and_Incentives
Attached image Giorgio
Untested: diff --git a/apps/editors/models.py b/apps/editors/models.py index df63776..563715e 100644 --- a/apps/editors/models.py +++ b/apps/editors/models.py @@ -648,11 +648,14 @@ class ReviewerScore(amo.models.ModelBase): user_level = len(amo.REVIEWED_LEVELS) - 1 for i, level in enumerate(amo.REVIEWED_LEVELS): if total < level['points']: - user_level = i + user_level = i - 1 break # Only show level if it changes. - level = amo.REVIEWED_LEVELS[user_level]['name'] + if user_level < 0: + level = '' + else: + level = amo.REVIEWED_LEVELS[user_level]['name'] if prev == level: level = '' else:
Assignee: nobody → kmaglione+bmo
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2013-06-13
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: