Commit ca0e6eb4 by Kelketek

Merge pull request #12 from mckinseyacademy/survey_tally_clean

More thorough cleaning of Survey Tally.
parents 7d9abab3 aaba28e4
......@@ -660,6 +660,10 @@ class SurveyBlock(PollBase):
if existing_key not in default_answers:
del new_answers[existing_key]
self.tally[key] = new_answers
# Keys for questions that no longer exist can break calculations.
for key in self.tally.keys():
if key not in questions:
del self.tally[key]
def remove_vote(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment