It turns out what was happening was a key error due to the dictionary that looks up css styles getting a '?1' or '?0' due to the encoding problem.
I've got this workaround in use for the moment
--- a/symposion/reviews/models.py
+++ b/symposion/reviews/models.py
@@ -36,6 +36,14 @@ class Votes(object):
(MINUS_ZERO, u"−0 — Weak proposal, but I will not argue strongly against acceptance."),
(MINUS_ONE, u"−1 — Serious issues and I will argue to reject this proposal."),
]
+
+ CSS_LOOKUP = {
+ PLUS_ONE: "plus-one",
+ PLUS_ZERO: "plus-zero",
+ MINUS_ZERO: "minus-zero",
+ MINUS_ONE: "minus-one",
+ }
+
VOTES = Votes()
def css_class(self):
- return {
- 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.vote]
-
+ # default to "minus-zero" style in the event our database has incorrectly encoded the vote
+ return self.VOTES.CSS_LOOKUP.get(
self.vote, "minus-zero")
+