From acc1b1490e33cd39cfe885102770f483ec874529 Mon Sep 17 00:00:00 2001 From: Scott Bragg Date: Mon, 13 Jun 2016 20:46:13 +1000 Subject: [PATCH] Update css_class methods to use new vote scoring (removed VOTE_ZERO) --- symposion/reviews/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/symposion/reviews/models.py b/symposion/reviews/models.py index ecfcde60..8cf828b7 100644 --- a/symposion/reviews/models.py +++ b/symposion/reviews/models.py @@ -177,10 +177,10 @@ class Review(models.Model): def css_class(self): return { + self.VOTES.PLUS_TWO: "plus-two", self.VOTES.PLUS_ONE: "plus-one", - self.VOTES.PLUS_ZERO: "plus-zero", - self.VOTES.MINUS_ZERO: "minus-zero", self.VOTES.MINUS_ONE: "minus-one", + self.VOTES.MINUS_TWO: "minus-two", }[self.vote] @property @@ -210,10 +210,10 @@ class LatestVote(models.Model): def css_class(self): return { + self.VOTES.PLUS_TWO: "plus-two", self.VOTES.PLUS_ONE: "plus-one", - self.VOTES.PLUS_ZERO: "plus-zero", - self.VOTES.MINUS_ZERO: "minus-zero", self.VOTES.MINUS_ONE: "minus-one", + self.VOTES.MINUS_TWO: "minus-two", }[self.vote]